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

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

Issue 56623005: Policy providers all get a SchemaRegistry to work with. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@chrome-policy-schema-9-purge-with-callback
Patch Set: Fixed mac tests 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
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 "chrome/browser/policy/profile_policy_connector.h" 8 #include "chrome/browser/policy/profile_policy_connector.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/common/pref_names.h" 10 #include "chrome/common/pref_names.h"
11 #include "components/browser_context_keyed_service/browser_context_dependency_ma nager.h" 11 #include "components/browser_context_keyed_service/browser_context_dependency_ma nager.h"
12 #include "components/user_prefs/pref_registry_syncable.h" 12 #include "components/user_prefs/pref_registry_syncable.h"
13 13
14 #if defined(ENABLE_CONFIGURATION_POLICY) 14 #if defined(ENABLE_CONFIGURATION_POLICY)
15 #include "chrome/browser/policy/schema_registry_service_factory.h"
15 #if defined(OS_CHROMEOS) 16 #if defined(OS_CHROMEOS)
16 #include "chrome/browser/chromeos/login/user_manager.h" 17 #include "chrome/browser/chromeos/login/user_manager.h"
17 #include "chrome/browser/chromeos/policy/user_cloud_policy_manager_factory_chrom eos.h" 18 #include "chrome/browser/chromeos/policy/user_cloud_policy_manager_factory_chrom eos.h"
18 #else 19 #else
19 #include "chrome/browser/policy/cloud/user_cloud_policy_manager_factory.h" 20 #include "chrome/browser/policy/cloud/user_cloud_policy_manager_factory.h"
20 #endif 21 #endif
21 #endif 22 #endif
22 23
23 namespace policy { 24 namespace policy {
24 25
(...skipping 22 matching lines...) Expand all
47 ProfilePolicyConnector*& map_entry = connectors_[profile]; 48 ProfilePolicyConnector*& map_entry = connectors_[profile];
48 CHECK(!map_entry); 49 CHECK(!map_entry);
49 map_entry = connector; 50 map_entry = connector;
50 } 51 }
51 52
52 ProfilePolicyConnectorFactory::ProfilePolicyConnectorFactory() 53 ProfilePolicyConnectorFactory::ProfilePolicyConnectorFactory()
53 : BrowserContextKeyedBaseFactory( 54 : BrowserContextKeyedBaseFactory(
54 "ProfilePolicyConnector", 55 "ProfilePolicyConnector",
55 BrowserContextDependencyManager::GetInstance()) { 56 BrowserContextDependencyManager::GetInstance()) {
56 #if defined(ENABLE_CONFIGURATION_POLICY) 57 #if defined(ENABLE_CONFIGURATION_POLICY)
58 DependsOn(SchemaRegistryServiceFactory::GetInstance());
57 #if defined(OS_CHROMEOS) 59 #if defined(OS_CHROMEOS)
58 DependsOn(UserCloudPolicyManagerFactoryChromeOS::GetInstance()); 60 DependsOn(UserCloudPolicyManagerFactoryChromeOS::GetInstance());
59 #else 61 #else
60 DependsOn(UserCloudPolicyManagerFactory::GetInstance()); 62 DependsOn(UserCloudPolicyManagerFactory::GetInstance());
61 #endif 63 #endif
62 #endif 64 #endif
63 } 65 }
64 66
65 ProfilePolicyConnectorFactory::~ProfilePolicyConnectorFactory() { 67 ProfilePolicyConnectorFactory::~ProfilePolicyConnectorFactory() {
66 DCHECK(connectors_.empty()); 68 DCHECK(connectors_.empty());
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 #endif 122 #endif
121 } 123 }
122 124
123 void ProfilePolicyConnectorFactory::SetEmptyTestingFactory( 125 void ProfilePolicyConnectorFactory::SetEmptyTestingFactory(
124 content::BrowserContext* context) {} 126 content::BrowserContext* context) {}
125 127
126 void ProfilePolicyConnectorFactory::CreateServiceNow( 128 void ProfilePolicyConnectorFactory::CreateServiceNow(
127 content::BrowserContext* context) {} 129 content::BrowserContext* context) {}
128 130
129 } // namespace policy 131 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698