New issue
Advanced search Search tips

Issue 798408 link

Starred by 2 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocked on:
issue 809461
issue 806778

Blocking:
issue 796544



Sign in to add a comment

Convert WebUI to use Identity Service client library

Project Member Reported by blundell@chromium.org, Jan 2 2018

Issue description

Most usages can be converted in a straightforward fashion to using IdentityManager to get the authenticated account information. A couple are more involved as they interact with OAuth2TokenService. List below:

AppLauncherLoginHandler gets the authenticated account info to determine whether to show sync login UI and also checks whether signin is allowed.
LocalDiscoveryUIHandler observes SigninManager to update the JS side with whether the user is logged in. It also gets the authenticated account info. Finally, it passes PO2TS and the authenticated account info to GCDApiFlow.
MDHistoryUI gets whether the user is signed in in order to set values on the JS side.
MediaRouterWebUIMessageHandler gets the authenticated account info to set values on the JS side and to determine whether to turn on cloud services.
NTPResourceCache gets the authenticated account info to set a value on the JS side.
PrintPreviewHandler makes access token requests for the primary account. It also does so using DeviceO2TS. Doing this conversion will involve having figured out our story for the Identity Service and device identity.
PrivetPrinterHandler gets the authenticated account info to set it on another C++ class.
ProfileInfoWatcher has a public wrapper that returns the authenticated username.
WelcomeHandler checks whether the user is signed in to determine whether to show a signin page.

 
Blockedon: 809461
Project Member

Comment 2 by bugdroid1@chromium.org, Apr 17 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a20642c976a85834476eadfa61b2077c971f5327

commit a20642c976a85834476eadfa61b2077c971f5327
Author: Marc Treib <treib@chromium.org>
Date: Tue Apr 17 08:35:54 2018

Migrate LocalDiscoveryUITest to IdentityManager

This CL migrates LocalDiscoveryUITest from the old SigninManager +
OAuth2TokenService to the new IdentityManager.

TBR=vitalybuka@chromium.org
(reviewed by @google.com account)

Bug:  825190 , 798408
Change-Id: If301de8524ee22c52dc4a4a0a0918c941d449226
Reviewed-on: https://chromium-review.googlesource.com/1012105
Commit-Queue: Marc Treib <treib@chromium.org>
Reviewed-by: Vitaly Buka <vitalybuka@google.com>
Cr-Commit-Position: refs/heads/master@{#551280}
[modify] https://crrev.com/a20642c976a85834476eadfa61b2077c971f5327/chrome/browser/ui/webui/local_discovery/local_discovery_ui_browsertest.cc

Cc: sdefresne@chromium.org
Owner: sdefresne@chromium.org
Status: Assigned (was: Available)
Project Member

Comment 5 by bugdroid1@chromium.org, Jun 12 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/14eab2435cacb09e37ff8f1f47ff498e1acdd650

commit 14eab2435cacb09e37ff8f1f47ff498e1acdd650
Author: Sylvain Defresne <sdefresne@chromium.org>
Date: Tue Jun 12 10:06:36 2018

Convert MdHistoryUI to use IdentityManager

Bug: 798408
Change-Id: I53b9d7f84ab95aece369e4ec37db687ce70b3a4c
Reviewed-on: https://chromium-review.googlesource.com/1095016
Commit-Queue: Sylvain Defresne <sdefresne@chromium.org>
Reviewed-by: David Roger <droger@chromium.org>
Reviewed-by: calamity <calamity@chromium.org>
Cr-Commit-Position: refs/heads/master@{#566373}
[modify] https://crrev.com/14eab2435cacb09e37ff8f1f47ff498e1acdd650/chrome/browser/ui/BUILD.gn
[modify] https://crrev.com/14eab2435cacb09e37ff8f1f47ff498e1acdd650/chrome/browser/ui/webui/md_history_ui.cc

Blockedon: 806778
Project Member

Comment 7 by bugdroid1@chromium.org, Jun 14 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/0f857554ba387388b942530b3c1eb1245b79ab2d

commit 0f857554ba387388b942530b3c1eb1245b79ab2d
Author: Sylvain Defresne <sdefresne@chromium.org>
Date: Thu Jun 14 09:05:49 2018

Convert MediaRouterWebUIMessageHandler to use IdentityManager

Bug: 798408
Change-Id: I6983b0468743607e8dd2a8722885a4861aaba8b2
Reviewed-on: https://chromium-review.googlesource.com/1096772
Reviewed-by: David Roger <droger@chromium.org>
Reviewed-by: Derek Cheng <imcheng@chromium.org>
Commit-Queue: Sylvain Defresne <sdefresne@chromium.org>
Cr-Commit-Position: refs/heads/master@{#567200}
[modify] https://crrev.com/0f857554ba387388b942530b3c1eb1245b79ab2d/chrome/browser/ui/BUILD.gn
[modify] https://crrev.com/0f857554ba387388b942530b3c1eb1245b79ab2d/chrome/browser/ui/webui/media_router/media_router_webui_message_handler.cc

Project Member

Comment 8 by bugdroid1@chromium.org, Jun 19 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c9746c4c7a0c2c1a3970b1ad37d6a434db38a395

commit c9746c4c7a0c2c1a3970b1ad37d6a434db38a395
Author: Sylvain Defresne <sdefresne@chromium.org>
Date: Tue Jun 19 10:19:09 2018

Convert NTPResourceCache to use IdentityManager

IdentityManager is the recommended API to access the
Google account used by the user and SigninManager is
deprecated.

Convert NTPResourceCache to the new API.

Bug: 798408
Change-Id: Ia94e15dd8b50f546a9d6b02957dfefe9d40105e0
Reviewed-on: https://chromium-review.googlesource.com/1097332
Reviewed-by: Evan Stade <estade@chromium.org>
Reviewed-by: Colin Blundell <blundell@chromium.org>
Commit-Queue: Sylvain Defresne <sdefresne@chromium.org>
Cr-Commit-Position: refs/heads/master@{#568391}
[modify] https://crrev.com/c9746c4c7a0c2c1a3970b1ad37d6a434db38a395/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc
[modify] https://crrev.com/c9746c4c7a0c2c1a3970b1ad37d6a434db38a395/chrome/browser/ui/webui/ntp/ntp_resource_cache_factory.cc

Project Member

Comment 9 by bugdroid1@chromium.org, Jun 20 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/776b544ccd060a98f3df5eb87dcdac32bce0030c

commit 776b544ccd060a98f3df5eb87dcdac32bce0030c
Author: Sylvain Defresne <sdefresne@chromium.org>
Date: Wed Jun 20 10:16:05 2018

Convert PrivetPrinterHandler to use IdentityManager

IdentityManager is the recommended API to access the
Google account used by the user and SigninManager is
deprecated.

Convert PrivetPrinterHandler to the new API.

Bug: 798408
Change-Id: I9cd18bd698f88ecda52d085ba661641d7c6fe06d
Reviewed-on: https://chromium-review.googlesource.com/1100758
Reviewed-by: Colin Blundell <blundell@chromium.org>
Reviewed-by: Wei Li <weili@chromium.org>
Commit-Queue: Sylvain Defresne <sdefresne@chromium.org>
Cr-Commit-Position: refs/heads/master@{#568781}
[modify] https://crrev.com/776b544ccd060a98f3df5eb87dcdac32bce0030c/chrome/browser/ui/webui/print_preview/privet_printer_handler.cc

Project Member

Comment 10 by bugdroid1@chromium.org, Jun 26 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6eb86b98979402a3443c9d55743f455a774af836

commit 6eb86b98979402a3443c9d55743f455a774af836
Author: Sylvain Defresne <sdefresne@chromium.org>
Date: Tue Jun 26 13:14:16 2018

Convert WelcomeHandler to use IdentityManager

IdentityManager is the recommended API to access the
Google account used by the user and SigninManager is
deprecated.

Convert WelcomeHandler to the new API.

Bug: 798408
Change-Id: I00cb9c7b9c2b144c5a900c583f089d844928a70c
Reviewed-on: https://chromium-review.googlesource.com/1113737
Reviewed-by: Colin Blundell <blundell@chromium.org>
Reviewed-by: Bernhard Bauer <bauerb@chromium.org>
Commit-Queue: Sylvain Defresne <sdefresne@chromium.org>
Cr-Commit-Position: refs/heads/master@{#570389}
[modify] https://crrev.com/6eb86b98979402a3443c9d55743f455a774af836/chrome/browser/ui/webui/welcome_handler.cc

Project Member

Comment 11 by bugdroid1@chromium.org, Jul 9

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/bdcbeea00f3a01c0627eec063d51f641822ba9cb

commit bdcbeea00f3a01c0627eec063d51f641822ba9cb
Author: Sylvain Defresne <sdefresne@chromium.org>
Date: Mon Jul 09 10:11:35 2018

Convert SyncConfirmationUI to use IdentityManager

IdentityManager is the recommended API to access the
Google account used by the user and SigninManager is
deprecated.

Convert SyncConfirmationUI to the new API.

Bug: 798408
Change-Id: I7d44e3b547bf694cefe57488fd8983bba064f0bd
Reviewed-on: https://chromium-review.googlesource.com/1124465
Reviewed-by: Colin Blundell <blundell@chromium.org>
Reviewed-by: Mihai Sardarescu <msarda@chromium.org>
Commit-Queue: Sylvain Defresne <sdefresne@chromium.org>
Cr-Commit-Position: refs/heads/master@{#573261}
[modify] https://crrev.com/bdcbeea00f3a01c0627eec063d51f641822ba9cb/chrome/browser/ui/webui/signin/sync_confirmation_ui.cc

Sign in to add a comment