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

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 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 } 234 }
235 235
236 void UserPolicySigninServiceBase::ShutdownUserCloudPolicyManager() { 236 void UserPolicySigninServiceBase::ShutdownUserCloudPolicyManager() {
237 PrepareForUserCloudPolicyManagerShutdown(); 237 PrepareForUserCloudPolicyManagerShutdown();
238 UserCloudPolicyManager* manager = GetManager(); 238 UserCloudPolicyManager* manager = GetManager();
239 if (manager) 239 if (manager)
240 manager->DisconnectAndRemovePolicy(); 240 manager->DisconnectAndRemovePolicy();
241 } 241 }
242 242
243 UserCloudPolicyManager* UserPolicySigninServiceBase::GetManager() { 243 UserCloudPolicyManager* UserPolicySigninServiceBase::GetManager() {
244 return UserCloudPolicyManagerFactory::GetForProfile(profile_); 244 return UserCloudPolicyManagerFactory::GetForBrowserContext(profile_);
245 } 245 }
246 246
247 SigninManager* UserPolicySigninServiceBase::GetSigninManager() { 247 SigninManager* UserPolicySigninServiceBase::GetSigninManager() {
248 return SigninManagerFactory::GetForProfile(profile_); 248 return SigninManagerFactory::GetForProfile(profile_);
249 } 249 }
250 250
251 } // namespace policy 251 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698