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

Unified Diff: chrome/browser/managed_mode/managed_user_registration_utility.cc

Issue 150003004: Replace PO2TS::GetPrimaryAccountId() with SMB::GetAuthenticatedAccountId. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/managed_mode/managed_user_registration_utility.cc
diff --git a/chrome/browser/managed_mode/managed_user_registration_utility.cc b/chrome/browser/managed_mode/managed_user_registration_utility.cc
index cf26a62783d6d0f2f96bbaf3240c48009222fe71..34b02f849fc1058a9c1ca2379a17c4e8c9a1fd60 100644
--- a/chrome/browser/managed_mode/managed_user_registration_utility.cc
+++ b/chrome/browser/managed_mode/managed_user_registration_utility.cc
@@ -20,6 +20,8 @@
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/signin/profile_oauth2_token_service.h"
#include "chrome/browser/signin/profile_oauth2_token_service_factory.h"
+#include "chrome/browser/signin/signin_manager.h"
+#include "chrome/browser/signin/signin_manager_factory.h"
#include "chrome/browser/sync/glue/device_info.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
@@ -141,10 +143,12 @@ ManagedUserRegistrationUtility::Create(Profile* profile) {
ProfileOAuth2TokenService* token_service =
ProfileOAuth2TokenServiceFactory::GetForProfile(profile);
+ SigninManagerBase* signin_manager =
+ SigninManagerFactory::GetForProfile(profile);
scoped_ptr<ManagedUserRefreshTokenFetcher> token_fetcher =
ManagedUserRefreshTokenFetcher::Create(
token_service,
- token_service->GetPrimaryAccountId(),
+ signin_manager->GetAuthenticatedAccountId(),
profile->GetRequestContext());
ManagedUserSyncService* managed_user_sync_service =
ManagedUserSyncServiceFactory::GetForProfile(profile);
« no previous file with comments | « chrome/browser/invalidation/ticl_invalidation_service.cc ('k') | chrome/browser/policy/cloud/user_policy_signin_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698