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

Side by Side Diff: chrome/browser/policy/schema_registry_service_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 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/schema_registry_service_factory.h" 5 #include "chrome/browser/policy/schema_registry_service_factory.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "chrome/browser/policy/schema_registry_service.h" 8 #include "chrome/browser/policy/schema_registry_service.h"
9 #include "components/keyed_service/content/browser_context_dependency_manager.h" 9 #include "components/keyed_service/content/browser_context_dependency_manager.h"
10 #include "components/policy/core/common/schema.h" 10 #include "components/policy/core/common/schema.h"
(...skipping 20 matching lines...) Expand all
31 Profile* profile = Profile::FromBrowserContext(context); 31 Profile* profile = Profile::FromBrowserContext(context);
32 32
33 if (chromeos::ProfileHelper::IsSigninProfile(profile)) 33 if (chromeos::ProfileHelper::IsSigninProfile(profile))
34 return NULL; 34 return NULL;
35 35
36 if (!user_manager::UserManager::IsInitialized()) { 36 if (!user_manager::UserManager::IsInitialized()) {
37 // Bail out in unit tests that don't have a UserManager. 37 // Bail out in unit tests that don't have a UserManager.
38 return NULL; 38 return NULL;
39 } 39 }
40 40
41 user_manager::User* user = 41 const user_manager::User* user =
42 chromeos::ProfileHelper::Get()->GetUserByProfile(profile); 42 chromeos::ProfileHelper::Get()->GetUserByProfile(profile);
43 if (!user) 43 if (!user)
44 return NULL; 44 return NULL;
45 45
46 BrowserPolicyConnectorChromeOS* connector = 46 BrowserPolicyConnectorChromeOS* connector =
47 g_browser_process->platform_part()->browser_policy_connector_chromeos(); 47 g_browser_process->platform_part()->browser_policy_connector_chromeos();
48 DeviceLocalAccountPolicyService* service = 48 DeviceLocalAccountPolicyService* service =
49 connector->GetDeviceLocalAccountPolicyService(); 49 connector->GetDeviceLocalAccountPolicyService();
50 if (!service) 50 if (!service)
51 return NULL; 51 return NULL;
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 148
149 bool SchemaRegistryServiceFactory::HasTestingFactory( 149 bool SchemaRegistryServiceFactory::HasTestingFactory(
150 content::BrowserContext* context) { 150 content::BrowserContext* context) {
151 return false; 151 return false;
152 } 152 }
153 153
154 void SchemaRegistryServiceFactory::CreateServiceNow( 154 void SchemaRegistryServiceFactory::CreateServiceNow(
155 content::BrowserContext* context) {} 155 content::BrowserContext* context) {}
156 156
157 } // namespace policy 157 } // namespace policy
OLDNEW
« no previous file with comments | « chrome/browser/policy/profile_policy_connector_factory.cc ('k') | chrome/browser/profiles/off_the_record_profile_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698