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

Side by Side Diff: chrome/browser/policy/profile_policy_connector_factory.cc

Issue 898003002: [Cleanup] Const-correct the profile() method for the EasyUnlockService (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 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 unified diff | Download patch
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/incognito_helpers.h" 10 #include "chrome/browser/profiles/incognito_helpers.h"
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 102
103 SchemaRegistry* schema_registry = NULL; 103 SchemaRegistry* schema_registry = NULL;
104 CloudPolicyManager* user_cloud_policy_manager = NULL; 104 CloudPolicyManager* user_cloud_policy_manager = NULL;
105 105
106 #if defined(ENABLE_CONFIGURATION_POLICY) 106 #if defined(ENABLE_CONFIGURATION_POLICY)
107 schema_registry = 107 schema_registry =
108 SchemaRegistryServiceFactory::GetForContext(context)->registry(); 108 SchemaRegistryServiceFactory::GetForContext(context)->registry();
109 109
110 #if defined(OS_CHROMEOS) 110 #if defined(OS_CHROMEOS)
111 Profile* const profile = Profile::FromBrowserContext(context); 111 Profile* const profile = Profile::FromBrowserContext(context);
112 user_manager::User* user = NULL; 112 const user_manager::User* user = NULL;
113 if (!chromeos::ProfileHelper::IsSigninProfile(profile)) { 113 if (!chromeos::ProfileHelper::IsSigninProfile(profile)) {
114 user = chromeos::ProfileHelper::Get()->GetUserByProfile(profile); 114 user = chromeos::ProfileHelper::Get()->GetUserByProfile(profile);
115 CHECK(user); 115 CHECK(user);
116 } 116 }
117 user_cloud_policy_manager = 117 user_cloud_policy_manager =
118 UserCloudPolicyManagerFactoryChromeOS::GetForProfile(profile); 118 UserCloudPolicyManagerFactoryChromeOS::GetForProfile(profile);
119 #else 119 #else
120 user_cloud_policy_manager = 120 user_cloud_policy_manager =
121 UserCloudPolicyManagerFactory::GetForBrowserContext(context); 121 UserCloudPolicyManagerFactory::GetForBrowserContext(context);
122 #endif // defined(OS_CHROMEOS) 122 #endif // defined(OS_CHROMEOS)
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 169
170 bool ProfilePolicyConnectorFactory::HasTestingFactory( 170 bool ProfilePolicyConnectorFactory::HasTestingFactory(
171 content::BrowserContext* context) { 171 content::BrowserContext* context) {
172 return false; 172 return false;
173 } 173 }
174 174
175 void ProfilePolicyConnectorFactory::CreateServiceNow( 175 void ProfilePolicyConnectorFactory::CreateServiceNow(
176 content::BrowserContext* context) {} 176 content::BrowserContext* context) {}
177 177
178 } // namespace policy 178 } // namespace policy
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/profiles/profile_helper.cc ('k') | chrome/browser/policy/schema_registry_service_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698