OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/configuration_policy_pref_store.h" | 5 #include "chrome/browser/policy/configuration_policy_pref_store.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
295 { Value::TYPE_STRING, kPolicyDefaultSearchProviderSuggestURL, | 295 { Value::TYPE_STRING, kPolicyDefaultSearchProviderSuggestURL, |
296 prefs::kDefaultSearchProviderSuggestURL }, | 296 prefs::kDefaultSearchProviderSuggestURL }, |
297 { Value::TYPE_STRING, kPolicyDefaultSearchProviderInstantURL, | 297 { Value::TYPE_STRING, kPolicyDefaultSearchProviderInstantURL, |
298 prefs::kDefaultSearchProviderInstantURL }, | 298 prefs::kDefaultSearchProviderInstantURL }, |
299 { Value::TYPE_STRING, kPolicyDefaultSearchProviderIconURL, | 299 { Value::TYPE_STRING, kPolicyDefaultSearchProviderIconURL, |
300 prefs::kDefaultSearchProviderIconURL }, | 300 prefs::kDefaultSearchProviderIconURL }, |
301 { Value::TYPE_LIST, kPolicyDefaultSearchProviderEncodings, | 301 { Value::TYPE_LIST, kPolicyDefaultSearchProviderEncodings, |
302 prefs::kDefaultSearchProviderEncodings }, | 302 prefs::kDefaultSearchProviderEncodings }, |
303 }; | 303 }; |
304 | 304 |
305 // static | |
306 ConfigurationPolicyPrefStore* ConfigurationPolicyPrefStore::Create( | |
Mattias Nissler (ping if slow)
2011/05/31 16:11:40
Can you please move this definition down so it mat
John Knottenbelt
2011/06/01 13:13:00
Done.
| |
307 ConfigurationPolicyProvider* provider) { | |
308 return new ConfigurationPolicyPrefStore(provider); | |
309 } | |
310 | |
305 ConfigurationPolicyPrefKeeper::ConfigurationPolicyPrefKeeper( | 311 ConfigurationPolicyPrefKeeper::ConfigurationPolicyPrefKeeper( |
306 ConfigurationPolicyProvider* provider) { | 312 ConfigurationPolicyProvider* provider) { |
307 if (!provider->Provide(this)) | 313 if (!provider->Provide(this)) |
308 LOG(WARNING) << "Failed to get policy from provider."; | 314 LOG(WARNING) << "Failed to get policy from provider."; |
309 FinalizeProxyPolicySettings(); | 315 FinalizeProxyPolicySettings(); |
310 FinalizeDefaultSearchPolicySettings(); | 316 FinalizeDefaultSearchPolicySettings(); |
311 } | 317 } |
312 | 318 |
313 ConfigurationPolicyPrefKeeper::~ConfigurationPolicyPrefKeeper() { | 319 ConfigurationPolicyPrefKeeper::~ConfigurationPolicyPrefKeeper() { |
314 DCHECK(proxy_policies_.empty()); | 320 DCHECK(proxy_policies_.empty()); |
(...skipping 818 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1133 // Update the initialization flag. | 1139 // Update the initialization flag. |
1134 if (!initialization_complete_ && | 1140 if (!initialization_complete_ && |
1135 provider_->IsInitializationComplete()) { | 1141 provider_->IsInitializationComplete()) { |
1136 initialization_complete_ = true; | 1142 initialization_complete_ = true; |
1137 FOR_EACH_OBSERVER(PrefStore::Observer, observers_, | 1143 FOR_EACH_OBSERVER(PrefStore::Observer, observers_, |
1138 OnInitializationCompleted(true)); | 1144 OnInitializationCompleted(true)); |
1139 } | 1145 } |
1140 } | 1146 } |
1141 | 1147 |
1142 } // namespace policy | 1148 } // namespace policy |
OLD | NEW |