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

Side by Side Diff: chrome/browser/policy/profile_policy_connector_factory.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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/profile_policy_connector_factory.h" 5 #include "chrome/browser/policy/profile_policy_connector_factory.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/memory/singleton.h" 8 #include "base/memory/singleton.h"
9 #include "chrome/browser/policy/profile_policy_connector.h" 9 #include "chrome/browser/policy/profile_policy_connector.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 chromeos::User* user = NULL; 90 chromeos::User* user = NULL;
91 if (!chromeos::ProfileHelper::IsSigninProfile(profile)) { 91 if (!chromeos::ProfileHelper::IsSigninProfile(profile)) {
92 chromeos::UserManager* user_manager = chromeos::UserManager::Get(); 92 chromeos::UserManager* user_manager = chromeos::UserManager::Get();
93 user = user_manager->GetUserByProfile(profile); 93 user = user_manager->GetUserByProfile(profile);
94 CHECK(user); 94 CHECK(user);
95 } 95 }
96 CloudPolicyManager* user_cloud_policy_manager = 96 CloudPolicyManager* user_cloud_policy_manager =
97 UserCloudPolicyManagerFactoryChromeOS::GetForProfile(profile); 97 UserCloudPolicyManagerFactoryChromeOS::GetForProfile(profile);
98 #else 98 #else
99 CloudPolicyManager* user_cloud_policy_manager = 99 CloudPolicyManager* user_cloud_policy_manager =
100 UserCloudPolicyManagerFactory::GetForProfile(profile); 100 UserCloudPolicyManagerFactory::GetForBrowserContext(profile);
101 #endif 101 #endif
102 #else 102 #else
103 CloudPolicyManager* user_cloud_policy_manager = NULL; 103 CloudPolicyManager* user_cloud_policy_manager = NULL;
104 #endif 104 #endif
105 ProfilePolicyConnector* connector = new ProfilePolicyConnector(profile); 105 ProfilePolicyConnector* connector = new ProfilePolicyConnector(profile);
106 connector->Init(force_immediate_load, 106 connector->Init(force_immediate_load,
107 #if defined(ENABLE_CONFIGURATION_POLICY) && defined(OS_CHROMEOS) 107 #if defined(ENABLE_CONFIGURATION_POLICY) && defined(OS_CHROMEOS)
108 user, 108 user,
109 #endif 109 #endif
110 user_cloud_policy_manager); 110 user_cloud_policy_manager);
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 #endif 145 #endif
146 } 146 }
147 147
148 void ProfilePolicyConnectorFactory::SetEmptyTestingFactory( 148 void ProfilePolicyConnectorFactory::SetEmptyTestingFactory(
149 content::BrowserContext* context) {} 149 content::BrowserContext* context) {}
150 150
151 void ProfilePolicyConnectorFactory::CreateServiceNow( 151 void ProfilePolicyConnectorFactory::CreateServiceNow(
152 content::BrowserContext* context) {} 152 content::BrowserContext* context) {}
153 153
154 } // namespace policy 154 } // namespace policy
OLDNEW
« no previous file with comments | « chrome/browser/policy/cloud/user_policy_signin_service_base.cc ('k') | chrome/browser/profiles/off_the_record_profile_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698