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

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

Issue 44083005: policy: Remove UserCloudPolicyManagerFactory's dependency on Profile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 7 years, 1 month 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_base.h" 5 #include "chrome/browser/policy/cloud/user_policy_signin_service_base.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "chrome/browser/chrome_notification_types.h" 10 #include "chrome/browser/chrome_notification_types.h"
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 } 226 }
227 227
228 void UserPolicySigninServiceBase::ShutdownUserCloudPolicyManager() { 228 void UserPolicySigninServiceBase::ShutdownUserCloudPolicyManager() {
229 PrepareForUserCloudPolicyManagerShutdown(); 229 PrepareForUserCloudPolicyManagerShutdown();
230 UserCloudPolicyManager* manager = GetManager(); 230 UserCloudPolicyManager* manager = GetManager();
231 if (manager) 231 if (manager)
232 manager->DisconnectAndRemovePolicy(); 232 manager->DisconnectAndRemovePolicy();
233 } 233 }
234 234
235 UserCloudPolicyManager* UserPolicySigninServiceBase::GetManager() { 235 UserCloudPolicyManager* UserPolicySigninServiceBase::GetManager() {
236 return UserCloudPolicyManagerFactory::GetForProfile(profile_); 236 return UserCloudPolicyManagerFactory::GetForBrowserContext(profile_);
237 } 237 }
238 238
239 SigninManager* UserPolicySigninServiceBase::GetSigninManager() { 239 SigninManager* UserPolicySigninServiceBase::GetSigninManager() {
240 return SigninManagerFactory::GetForProfile(profile_); 240 return SigninManagerFactory::GetForProfile(profile_);
241 } 241 }
242 242
243 } // namespace policy 243 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698