| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/lazy_instance.h" | 8 #include "base/lazy_instance.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
| (...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 341 | 341 |
| 342 // Check whether there's a default value, which indicates READ_USE_DEFAULT | 342 // Check whether there's a default value, which indicates READ_USE_DEFAULT |
| 343 // should be returned. | 343 // should be returned. |
| 344 if (configured_value->IsType(Value::TYPE_NULL)) | 344 if (configured_value->IsType(Value::TYPE_NULL)) |
| 345 return READ_USE_DEFAULT; | 345 return READ_USE_DEFAULT; |
| 346 | 346 |
| 347 *value = configured_value; | 347 *value = configured_value; |
| 348 return READ_OK; | 348 return READ_OK; |
| 349 } | 349 } |
| 350 | 350 |
| 351 DictionaryValue* ConfigurationPolicyPrefStore::prefs() const { |
| 352 return prefs_.get(); |
| 353 } |
| 354 |
| 351 void ConfigurationPolicyPrefStore::Apply(ConfigurationPolicyType policy, | 355 void ConfigurationPolicyPrefStore::Apply(ConfigurationPolicyType policy, |
| 352 Value* value) { | 356 Value* value) { |
| 353 if (ApplyProxyPolicy(policy, value)) | 357 if (ApplyProxyPolicy(policy, value)) |
| 354 return; | 358 return; |
| 355 | 359 |
| 356 if (ApplySyncPolicy(policy, value)) | 360 if (ApplySyncPolicy(policy, value)) |
| 357 return; | 361 return; |
| 358 | 362 |
| 359 if (ApplyAutoFillPolicy(policy, value)) | 363 if (ApplyAutoFillPolicy(policy, value)) |
| 360 return; | 364 return; |
| (...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 656 std::string()); | 660 std::string()); |
| 657 return; | 661 return; |
| 658 } | 662 } |
| 659 } | 663 } |
| 660 // Required entries are not there. Remove any related entries. | 664 // Required entries are not there. Remove any related entries. |
| 661 RemovePreferencesOfMap(kDefaultSearchPolicyMap, | 665 RemovePreferencesOfMap(kDefaultSearchPolicyMap, |
| 662 arraysize(kDefaultSearchPolicyMap)); | 666 arraysize(kDefaultSearchPolicyMap)); |
| 663 } | 667 } |
| 664 | 668 |
| 665 } // namespace policy | 669 } // namespace policy |
| OLD | NEW |