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

Side by Side Diff: chrome/browser/policy/cloud/user_policy_signin_service_mobile.cc

Issue 2953253002: [DICE] Enable sync for an account that is already present in the token service. (Closed)
Patch Set: Prepare for review Created 3 years, 6 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/policy/cloud/user_policy_signin_service_mobile.h" 5 #include "chrome/browser/policy/cloud/user_policy_signin_service_mobile.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 policy_manager, 55 policy_manager,
56 signin_manager, 56 signin_manager,
57 system_request_context), 57 system_request_context),
58 oauth2_token_service_(token_service), 58 oauth2_token_service_(token_service),
59 profile_prefs_(profile->GetPrefs()), 59 profile_prefs_(profile->GetPrefs()),
60 weak_factory_(this) { 60 weak_factory_(this) {
61 } 61 }
62 62
63 UserPolicySigninService::~UserPolicySigninService() {} 63 UserPolicySigninService::~UserPolicySigninService() {}
64 64
65 void UserPolicySigninService::RegisterForPolicy( 65 void UserPolicySigninService::RegisterForPolicyWithAccountId(
66 const std::string& username, 66 const std::string& username,
67 const std::string& account_id, 67 const std::string& account_id,
68 const PolicyRegistrationCallback& callback) { 68 const PolicyRegistrationCallback& callback) {
69 RegisterForPolicyInternal(username, account_id, "", callback); 69 RegisterForPolicyInternal(username, account_id, "", callback);
70 } 70 }
71 71
72 #if !defined(OS_ANDROID) 72 #if !defined(OS_ANDROID)
droger 2017/06/26 09:17:50 Be consistent with header (remove the ifdef, or de
msarda 2017/06/27 09:06:19 Done.
73 void UserPolicySigninService::RegisterForPolicyWithAccessToken( 73 void UserPolicySigninService::RegisterForPolicyWithAccessToken(
74 const std::string& username, 74 const std::string& username,
75 const std::string& access_token, 75 const std::string& access_token,
76 const PolicyRegistrationCallback& callback) { 76 const PolicyRegistrationCallback& callback) {
77 RegisterForPolicyInternal(username, "", access_token, callback); 77 RegisterForPolicyInternal(username, "", access_token, callback);
78 } 78 }
79 79
80 // static 80 // static
81 std::vector<std::string> UserPolicySigninService::GetScopes() { 81 std::vector<std::string> UserPolicySigninService::GetScopes() {
82 return CloudPolicyClientRegistrationHelper::GetScopes(); 82 return CloudPolicyClientRegistrationHelper::GetScopes();
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 void UserPolicySigninService::CancelPendingRegistration() { 204 void UserPolicySigninService::CancelPendingRegistration() {
205 weak_factory_.InvalidateWeakPtrs(); 205 weak_factory_.InvalidateWeakPtrs();
206 registration_helper_.reset(); 206 registration_helper_.reset();
207 } 207 }
208 208
209 void UserPolicySigninService::OnRegistrationDone() { 209 void UserPolicySigninService::OnRegistrationDone() {
210 registration_helper_.reset(); 210 registration_helper_.reset();
211 } 211 }
212 212
213 } // namespace policy 213 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698