Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(396)

Issue 34523003: settings: Make DeviceOAuth2TokenServiceFactory::Get() async (Closed)

Created:
7 years, 2 months ago by satorux1
Modified:
7 years, 2 months ago
CC:
chromium-reviews, extensions-reviews_chromium.org, nkostylev+watch_chromium.org, oshima+watch_chromium.org, chromium-apps-reviews_chromium.org, stevenjb+watch_chromium.org, davemoore+watch_chromium.org
Visibility:
Public.

Description

settings: Make DeviceOAuth2TokenServiceFactory::Get() async This is in preparation for fixing nasty D-Bus method call issues in DeviceOAuth2TokenService. In crrev.com/228189, we had to add horrible hacks to workaround an urgent P1 issue, which needed to be merged to M31 branch immediately. The root cause of this problem is the fact that DeviceOAuth2TokenService issues D-Bus method calls, which should be asynchronous, from places where doing it asynchronously is difficult (in particular, making GetRefreshToken() asynchronous is very difficult: crbug.com/309952). A simpler solution for this problem is to get the system salt before creating DeviceOAuth2TokenService, hence Get() should be asynchronous. BUG=309959, 306547 TEST=none R=courage@chromium.org, hashimoto@chromium.org, pastarmovj@chromium.org, pneubeck@chromium.org, xiyuan@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=230624

Patch Set 1 : #

Total comments: 40

Patch Set 2 : rebase #

Patch Set 3 : address comments #

Total comments: 6

Patch Set 4 : rebase #

Patch Set 5 : address comments #

Messages

Total messages: 16 (0 generated)
satorux1
pneubeck: chrome/browser/chromeos/policy pastarmovj: chrome/browser/chromeos/settings courage: chrome/browser/extensions/api/identity vitalybuka: chrome/browser/ui/webui/print_preview/print_preview_handler.cc xiyuan: chrome/browser/chromeos/login/kiosk_browsertest.cc hashimoto: in general :)
7 years, 2 months ago (2013-10-22 07:33:38 UTC) #1
hashimoto
lgtm https://codereview.chromium.org/34523003/diff/40001/chrome/browser/chromeos/login/kiosk_browsertest.cc File chrome/browser/chromeos/login/kiosk_browsertest.cc (right): https://codereview.chromium.org/34523003/diff/40001/chrome/browser/chromeos/login/kiosk_browsertest.cc#newcode710 chrome/browser/chromeos/login/kiosk_browsertest.cc:710: base::RunLoop().RunUntilIdle(); nit: How about having ASSERT_TRUE(token_service) here? https://codereview.chromium.org/34523003/diff/40001/chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos_unittest.cc ...
7 years, 2 months ago (2013-10-22 08:49:51 UTC) #2
pneubeck (no reviews)
https://codereview.chromium.org/34523003/diff/40001/chrome/browser/chromeos/policy/enrollment_handler_chromeos.cc File chrome/browser/chromeos/policy/enrollment_handler_chromeos.cc (right): https://codereview.chromium.org/34523003/diff/40001/chrome/browser/chromeos/policy/enrollment_handler_chromeos.cc#newcode166 chrome/browser/chromeos/policy/enrollment_handler_chromeos.cc:166: weak_factory_.GetWeakPtr())); it needs some reading of the code to ...
7 years, 2 months ago (2013-10-22 09:05:03 UTC) #3
satorux1
hashimoto and pneubeck, thank you for responding very quickly! I don't have access to code ...
7 years, 2 months ago (2013-10-22 09:56:43 UTC) #4
xiyuan
Thank you for following up on this. I would appreciate you add more context for ...
7 years, 2 months ago (2013-10-22 20:16:55 UTC) #5
satorux1
On 2013/10/22 20:16:55, xiyuan wrote: > Thank you for following up on this. I would ...
7 years, 2 months ago (2013-10-22 22:57:07 UTC) #6
xiyuan
Cool. Thank you for clarifying in CL description.
7 years, 2 months ago (2013-10-22 23:21:16 UTC) #7
Michael Courage
https://codereview.chromium.org/34523003/diff/40001/chrome/browser/extensions/api/identity/identity_api.cc File chrome/browser/extensions/api/identity/identity_api.cc (right): https://codereview.chromium.org/34523003/diff/40001/chrome/browser/extensions/api/identity/identity_api.cc#newcode402 chrome/browser/extensions/api/identity/identity_api.cc:402: chromeos::DeviceOAuth2TokenService* service) { On 2013/10/22 09:56:43, satorux1 wrote: > ...
7 years, 2 months ago (2013-10-23 00:22:46 UTC) #8
satorux1
https://codereview.chromium.org/34523003/diff/40001/chrome/browser/extensions/api/identity/identity_api.cc File chrome/browser/extensions/api/identity/identity_api.cc (right): https://codereview.chromium.org/34523003/diff/40001/chrome/browser/extensions/api/identity/identity_api.cc#newcode402 chrome/browser/extensions/api/identity/identity_api.cc:402: chromeos::DeviceOAuth2TokenService* service) { On 2013/10/23 00:22:47, Michael Courage wrote: ...
7 years, 2 months ago (2013-10-23 04:23:26 UTC) #9
satorux1
Addressed all comments. https://codereview.chromium.org/34523003/diff/40001/chrome/browser/chromeos/login/kiosk_browsertest.cc File chrome/browser/chromeos/login/kiosk_browsertest.cc (right): https://codereview.chromium.org/34523003/diff/40001/chrome/browser/chromeos/login/kiosk_browsertest.cc#newcode710 chrome/browser/chromeos/login/kiosk_browsertest.cc:710: base::RunLoop().RunUntilIdle(); On 2013/10/22 09:56:43, satorux1 wrote: ...
7 years, 2 months ago (2013-10-23 06:35:44 UTC) #10
pneubeck (no reviews)
lgtm https://codereview.chromium.org/34523003/diff/250001/chrome/browser/chromeos/policy/enrollment_handler_chromeos.h File chrome/browser/chromeos/policy/enrollment_handler_chromeos.h (right): https://codereview.chromium.org/34523003/diff/250001/chrome/browser/chromeos/policy/enrollment_handler_chromeos.h#newcode183 chrome/browser/chromeos/policy/enrollment_handler_chromeos.h:183: // Used for getting the OAuth2 token service. ...
7 years, 2 months ago (2013-10-23 07:27:38 UTC) #11
pastarmovj
LGTM for settings with one request. https://codereview.chromium.org/34523003/diff/250001/chrome/browser/chromeos/settings/device_oauth2_token_service_factory.cc File chrome/browser/chromeos/settings/device_oauth2_token_service_factory.cc (right): https://codereview.chromium.org/34523003/diff/250001/chrome/browser/chromeos/settings/device_oauth2_token_service_factory.cc#newcode40 chrome/browser/chromeos/settings/device_oauth2_token_service_factory.cc:40: // TODO(satorux): Implement ...
7 years, 2 months ago (2013-10-23 08:02:16 UTC) #12
xiyuan
kiosk_browsertest.cc LGTM
7 years, 2 months ago (2013-10-23 16:16:26 UTC) #13
Michael Courage
lgtm with one nit https://codereview.chromium.org/34523003/diff/250001/chrome/browser/extensions/api/identity/identity_api.cc File chrome/browser/extensions/api/identity/identity_api.cc (right): https://codereview.chromium.org/34523003/diff/250001/chrome/browser/extensions/api/identity/identity_api.cc#newcode404 chrome/browser/extensions/api/identity/identity_api.cc:404: CompleteFunctionWithError(identity_constants::kAuthFailure); Can you change this ...
7 years, 2 months ago (2013-10-23 18:04:10 UTC) #14
satorux1
https://codereview.chromium.org/34523003/diff/250001/chrome/browser/chromeos/policy/enrollment_handler_chromeos.h File chrome/browser/chromeos/policy/enrollment_handler_chromeos.h (right): https://codereview.chromium.org/34523003/diff/250001/chrome/browser/chromeos/policy/enrollment_handler_chromeos.h#newcode183 chrome/browser/chromeos/policy/enrollment_handler_chromeos.h:183: // Used for getting the OAuth2 token service. This ...
7 years, 2 months ago (2013-10-24 01:49:26 UTC) #15
satorux1
7 years, 2 months ago (2013-10-24 03:54:50 UTC) #16
Message was sent while issue was closed.
Committed patchset #5 manually as r230624 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698