Chromium Code Reviews| 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" |
| 11 #include "base/stl_util-inl.h" | |
| 11 #include "base/string16.h" | 12 #include "base/string16.h" |
| 12 #include "base/string_util.h" | 13 #include "base/string_util.h" |
| 13 #include "base/utf_string_conversions.h" | 14 #include "base/utf_string_conversions.h" |
| 14 #include "base/values.h" | 15 #include "base/values.h" |
| 16 #include "chrome/browser/prefs/proxy_prefs.h" | |
| 15 #include "chrome/browser/profiles/profile.h" | 17 #include "chrome/browser/profiles/profile.h" |
| 16 #include "chrome/browser/policy/configuration_policy_provider.h" | 18 #include "chrome/browser/policy/configuration_policy_provider.h" |
| 17 #if defined(OS_WIN) | 19 #if defined(OS_WIN) |
| 18 #include "chrome/browser/policy/configuration_policy_provider_win.h" | 20 #include "chrome/browser/policy/configuration_policy_provider_win.h" |
| 19 #elif defined(OS_MACOSX) | 21 #elif defined(OS_MACOSX) |
| 20 #include "chrome/browser/policy/configuration_policy_provider_mac.h" | 22 #include "chrome/browser/policy/configuration_policy_provider_mac.h" |
| 21 #elif defined(OS_POSIX) | 23 #elif defined(OS_POSIX) |
| 22 #include "chrome/browser/policy/config_dir_policy_provider.h" | 24 #include "chrome/browser/policy/config_dir_policy_provider.h" |
| 23 #endif | 25 #endif |
| 24 #include "chrome/browser/policy/device_management_policy_provider.h" | 26 #include "chrome/browser/policy/device_management_policy_provider.h" |
| (...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 241 { kPolicyDefaultSearchProviderKeyword, Value::TYPE_STRING, | 243 { kPolicyDefaultSearchProviderKeyword, Value::TYPE_STRING, |
| 242 key::kDefaultSearchProviderKeyword }, | 244 key::kDefaultSearchProviderKeyword }, |
| 243 { kPolicyDefaultSearchProviderSearchURL, Value::TYPE_STRING, | 245 { kPolicyDefaultSearchProviderSearchURL, Value::TYPE_STRING, |
| 244 key::kDefaultSearchProviderSearchURL }, | 246 key::kDefaultSearchProviderSearchURL }, |
| 245 { kPolicyDefaultSearchProviderSuggestURL, Value::TYPE_STRING, | 247 { kPolicyDefaultSearchProviderSuggestURL, Value::TYPE_STRING, |
| 246 key::kDefaultSearchProviderSuggestURL }, | 248 key::kDefaultSearchProviderSuggestURL }, |
| 247 { kPolicyDefaultSearchProviderIconURL, Value::TYPE_STRING, | 249 { kPolicyDefaultSearchProviderIconURL, Value::TYPE_STRING, |
| 248 key::kDefaultSearchProviderIconURL }, | 250 key::kDefaultSearchProviderIconURL }, |
| 249 { kPolicyDefaultSearchProviderEncodings, Value::TYPE_STRING, | 251 { kPolicyDefaultSearchProviderEncodings, Value::TYPE_STRING, |
| 250 key::kDefaultSearchProviderEncodings }, | 252 key::kDefaultSearchProviderEncodings }, |
| 251 { kPolicyProxyServerMode, Value::TYPE_INTEGER, key::kProxyServerMode }, | 253 { kPolicyProxyMode, Value::TYPE_INTEGER, key::kProxyMode }, |
| 252 { kPolicyProxyServer, Value::TYPE_STRING, key::kProxyServer }, | 254 { kPolicyProxyServer, Value::TYPE_STRING, key::kProxyServer }, |
| 253 { kPolicyProxyPacUrl, Value::TYPE_STRING, key::kProxyPacUrl }, | 255 { kPolicyProxyPacUrl, Value::TYPE_STRING, key::kProxyPacUrl }, |
| 254 { kPolicyProxyBypassList, Value::TYPE_STRING, key::kProxyBypassList }, | 256 { kPolicyProxyBypassList, Value::TYPE_STRING, key::kProxyBypassList }, |
| 255 { kPolicyAlternateErrorPagesEnabled, Value::TYPE_BOOLEAN, | 257 { kPolicyAlternateErrorPagesEnabled, Value::TYPE_BOOLEAN, |
| 256 key::kAlternateErrorPagesEnabled }, | 258 key::kAlternateErrorPagesEnabled }, |
| 257 { kPolicySearchSuggestEnabled, Value::TYPE_BOOLEAN, | 259 { kPolicySearchSuggestEnabled, Value::TYPE_BOOLEAN, |
| 258 key::kSearchSuggestEnabled }, | 260 key::kSearchSuggestEnabled }, |
| 259 { kPolicyDnsPrefetchingEnabled, Value::TYPE_BOOLEAN, | 261 { kPolicyDnsPrefetchingEnabled, Value::TYPE_BOOLEAN, |
| 260 key::kDnsPrefetchingEnabled }, | 262 key::kDnsPrefetchingEnabled }, |
| 261 { kPolicyDisableSpdy, Value::TYPE_BOOLEAN, key::kDisableSpdy }, | 263 { kPolicyDisableSpdy, Value::TYPE_BOOLEAN, key::kDisableSpdy }, |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 324 static ConfigurationPolicyProvider::PolicyDefinitionList policy_list = { | 326 static ConfigurationPolicyProvider::PolicyDefinitionList policy_list = { |
| 325 entries, | 327 entries, |
| 326 entries + arraysize(entries), | 328 entries + arraysize(entries), |
| 327 }; | 329 }; |
| 328 return &policy_list; | 330 return &policy_list; |
| 329 } | 331 } |
| 330 | 332 |
| 331 ConfigurationPolicyPrefStore::ConfigurationPolicyPrefStore( | 333 ConfigurationPolicyPrefStore::ConfigurationPolicyPrefStore( |
| 332 ConfigurationPolicyProvider* provider) | 334 ConfigurationPolicyProvider* provider) |
| 333 : provider_(provider), | 335 : provider_(provider), |
| 334 prefs_(new DictionaryValue()), | 336 prefs_(new DictionaryValue()) { |
| 335 lower_priority_proxy_settings_overridden_(false), | |
| 336 proxy_disabled_(false), | |
| 337 proxy_configuration_specified_(false), | |
| 338 use_system_proxy_(false) { | |
| 339 if (!provider_->Provide(this)) | 337 if (!provider_->Provide(this)) |
| 340 LOG(WARNING) << "Failed to get policy from provider."; | 338 LOG(WARNING) << "Failed to get policy from provider."; |
| 339 FinalizeProxyPolicySettings(); | |
| 341 FinalizeDefaultSearchPolicySettings(); | 340 FinalizeDefaultSearchPolicySettings(); |
| 342 } | 341 } |
| 343 | 342 |
| 344 ConfigurationPolicyPrefStore::~ConfigurationPolicyPrefStore() {} | 343 ConfigurationPolicyPrefStore::~ConfigurationPolicyPrefStore() { |
| 344 DCHECK(proxy_policies_.empty()); | |
| 345 } | |
| 345 | 346 |
| 346 PrefStore::ReadResult ConfigurationPolicyPrefStore::GetValue( | 347 PrefStore::ReadResult ConfigurationPolicyPrefStore::GetValue( |
| 347 const std::string& key, | 348 const std::string& key, |
| 348 Value** value) const { | 349 Value** value) const { |
| 349 Value* configured_value = NULL; | 350 Value* configured_value = NULL; |
| 350 if (!prefs_->Get(key, &configured_value) || !configured_value) | 351 if (!prefs_->Get(key, &configured_value) || !configured_value) |
| 351 return READ_NO_VALUE; | 352 return READ_NO_VALUE; |
| 352 | 353 |
| 353 // Check whether there's a default value, which indicates READ_USE_DEFAULT | 354 // Check whether there's a default value, which indicates READ_USE_DEFAULT |
| 354 // should be returned. | 355 // should be returned. |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 408 return new ConfigurationPolicyPrefStore(provider); | 409 return new ConfigurationPolicyPrefStore(provider); |
| 409 } | 410 } |
| 410 | 411 |
| 411 // static | 412 // static |
| 412 ConfigurationPolicyPrefStore* | 413 ConfigurationPolicyPrefStore* |
| 413 ConfigurationPolicyPrefStore::CreateRecommendedPolicyPrefStore() { | 414 ConfigurationPolicyPrefStore::CreateRecommendedPolicyPrefStore() { |
| 414 return new ConfigurationPolicyPrefStore( | 415 return new ConfigurationPolicyPrefStore( |
| 415 g_configuration_policy_provider_keeper.Get().recommended_provider()); | 416 g_configuration_policy_provider_keeper.Get().recommended_provider()); |
| 416 } | 417 } |
| 417 | 418 |
| 418 // static | |
| 419 void ConfigurationPolicyPrefStore::GetProxyPreferenceSet( | |
| 420 ProxyPreferenceSet* proxy_pref_set) { | |
| 421 proxy_pref_set->clear(); | |
| 422 for (size_t current = 0; current < arraysize(kProxyPolicyMap); ++current) { | |
| 423 proxy_pref_set->insert(kProxyPolicyMap[current].preference_path); | |
| 424 } | |
| 425 proxy_pref_set->insert(prefs::kNoProxyServer); | |
| 426 proxy_pref_set->insert(prefs::kProxyAutoDetect); | |
| 427 } | |
| 428 | |
| 429 const ConfigurationPolicyPrefStore::PolicyToPreferenceMapEntry* | 419 const ConfigurationPolicyPrefStore::PolicyToPreferenceMapEntry* |
| 430 ConfigurationPolicyPrefStore::FindPolicyInMap( | 420 ConfigurationPolicyPrefStore::FindPolicyInMap( |
| 431 ConfigurationPolicyType policy, | 421 ConfigurationPolicyType policy, |
| 432 const PolicyToPreferenceMapEntry* map, | 422 const PolicyToPreferenceMapEntry* map, |
| 433 int table_size) const { | 423 int table_size) const { |
| 434 for (int i = 0; i < table_size; ++i) { | 424 for (int i = 0; i < table_size; ++i) { |
| 435 if (map[i].policy_type == policy) | 425 if (map[i].policy_type == policy) |
| 436 return map + i; | 426 return map + i; |
| 437 } | 427 } |
| 438 return NULL; | 428 return NULL; |
| (...skipping 23 matching lines...) Expand all Loading... | |
| 462 prefs_->Set(map[current].preference_path, value); | 452 prefs_->Set(map[current].preference_path, value); |
| 463 return true; | 453 return true; |
| 464 } | 454 } |
| 465 } | 455 } |
| 466 return false; | 456 return false; |
| 467 } | 457 } |
| 468 | 458 |
| 469 bool ConfigurationPolicyPrefStore::ApplyProxyPolicy( | 459 bool ConfigurationPolicyPrefStore::ApplyProxyPolicy( |
| 470 ConfigurationPolicyType policy, | 460 ConfigurationPolicyType policy, |
| 471 Value* value) { | 461 Value* value) { |
| 472 bool result = false; | 462 // We only collect the values until we have sufficient information when |
| 473 bool warn_about_proxy_disable_config = false; | 463 // FinalizeProxyPolicySettings() is called to determine whether the presented |
| 474 bool warn_about_proxy_system_config = false; | 464 // values were correct and apply them in that case. |
| 465 if (policy == kPolicyProxyMode || | |
| 466 policy == kPolicyProxyServer || | |
| 467 policy == kPolicyProxyPacUrl || | |
| 468 policy == kPolicyProxyBypassList) { | |
| 469 delete proxy_policies_[policy]; | |
| 470 proxy_policies_[policy] = value; | |
| 471 return true; | |
| 472 } | |
| 473 // We are not interested in this policy. | |
| 474 return false; | |
| 475 } | |
| 475 | 476 |
| 476 const PolicyToPreferenceMapEntry* match_entry = | 477 void ConfigurationPolicyPrefStore::FinalizeProxyPolicySettings() { |
| 477 FindPolicyInMap(policy, kProxyPolicyMap, arraysize(kProxyPolicyMap)); | 478 if (CheckProxySettings()) |
| 479 ApplyProxySettings(); | |
| 478 | 480 |
| 479 // When the first proxy-related policy is applied, ALL proxy-related | 481 STLDeleteContainerPairSecondPointers(proxy_policies_.begin(), |
| 480 // preferences that have been set by command-line switches, extensions, | 482 proxy_policies_.end()); |
| 481 // user preferences or any other mechanism are overridden. Otherwise | 483 proxy_policies_.clear(); |
| 482 // it's possible for a user to interfere with proxy policy by setting | 484 } |
| 483 // proxy-related command-line switches or set proxy-related prefs in an | 485 |
| 484 // extension that are related, but not identical, to the ones set through | 486 bool ConfigurationPolicyPrefStore::HasProxyPolicy( |
| 485 // policy. | 487 ConfigurationPolicyType policy) const { |
| 486 if (!lower_priority_proxy_settings_overridden_ && | 488 std::map<ConfigurationPolicyType, Value*>::const_iterator iter; |
| 487 (match_entry || | 489 iter = proxy_policies_.find(policy); |
| 488 policy == kPolicyProxyServerMode)) { | 490 return iter != proxy_policies_.end() && |
| 489 ProxyPreferenceSet proxy_preference_set; | 491 iter->second && !iter->second->IsType(Value::TYPE_NULL); |
| 490 GetProxyPreferenceSet(&proxy_preference_set); | 492 } |
| 491 for (ProxyPreferenceSet::const_iterator i = proxy_preference_set.begin(); | 493 |
| 492 i != proxy_preference_set.end(); ++i) { | 494 bool ConfigurationPolicyPrefStore::CheckProxySettings() { |
| 493 // We use values of TYPE_NULL to mark preferences for which | 495 bool mode = HasProxyPolicy(kPolicyProxyMode); |
| 494 // READ_USE_DEFAULT should be returned by GetValue(). | 496 bool server = HasProxyPolicy(kPolicyProxyServer); |
| 495 prefs_->Set(*i, Value::CreateNullValue()); | 497 bool pac_url = HasProxyPolicy(kPolicyProxyPacUrl); |
| 496 } | 498 bool bypass_list = HasProxyPolicy(kPolicyProxyBypassList); |
| 497 lower_priority_proxy_settings_overridden_ = true; | 499 |
| 500 if ((server || pac_url || bypass_list) && !mode) { | |
| 501 LOG(WARNING) << "A centrally-administered policy defines proxy setting" | |
| 502 << " details without setting a proxy mode."; | |
| 503 return false; | |
| 498 } | 504 } |
| 499 | 505 |
| 500 // Translate the proxy policy into preferences. | 506 if (!mode) |
| 501 if (policy == kPolicyProxyServerMode) { | 507 return true; |
| 502 int int_value; | |
| 503 bool proxy_auto_detect = false; | |
| 504 if (value->GetAsInteger(&int_value)) { | |
| 505 result = true; | |
| 506 switch (int_value) { | |
| 507 case kPolicyNoProxyServerMode: | |
| 508 if (!proxy_disabled_) { | |
| 509 if (proxy_configuration_specified_) | |
| 510 warn_about_proxy_disable_config = true; | |
| 511 proxy_disabled_ = true; | |
| 512 } | |
| 513 break; | |
| 514 case kPolicyAutoDetectProxyMode: | |
| 515 proxy_auto_detect = true; | |
| 516 break; | |
| 517 case kPolicyManuallyConfiguredProxyMode: | |
| 518 break; | |
| 519 case kPolicyUseSystemProxyMode: | |
| 520 if (!use_system_proxy_) { | |
| 521 if (proxy_configuration_specified_) | |
| 522 warn_about_proxy_system_config = true; | |
| 523 use_system_proxy_ = true; | |
| 524 } | |
| 525 break; | |
| 526 default: | |
| 527 // Not a valid policy, don't assume ownership of |value| | |
| 528 result = false; | |
| 529 break; | |
| 530 } | |
| 531 | 508 |
| 532 if (int_value != kPolicyUseSystemProxyMode) { | 509 int mode_value; |
| 533 prefs_->Set(prefs::kNoProxyServer, | 510 if (!proxy_policies_[kPolicyProxyMode]->GetAsInteger(&mode_value)) { |
| 534 Value::CreateBooleanValue(proxy_disabled_)); | 511 LOG(WARNING) << "Invalid proxy mode value."; |
| 535 prefs_->Set(prefs::kProxyAutoDetect, | 512 return false; |
| 536 Value::CreateBooleanValue(proxy_auto_detect)); | |
| 537 } | |
| 538 } | |
| 539 } else if (match_entry) { | |
| 540 // Determine if the applied proxy policy settings conflict and issue | |
| 541 // a corresponding warning if they do. | |
| 542 if (!proxy_configuration_specified_) { | |
| 543 if (proxy_disabled_) | |
| 544 warn_about_proxy_disable_config = true; | |
| 545 if (use_system_proxy_) | |
| 546 warn_about_proxy_system_config = true; | |
| 547 proxy_configuration_specified_ = true; | |
| 548 } | |
| 549 if (!use_system_proxy_ && !proxy_disabled_) { | |
| 550 prefs_->Set(match_entry->preference_path, value); | |
| 551 // The ownership of value has been passed on to |prefs_|, | |
| 552 // don't clean it up later. | |
| 553 value = NULL; | |
| 554 } | |
| 555 result = true; | |
| 556 } | 513 } |
| 557 | 514 |
| 558 if (warn_about_proxy_disable_config) { | 515 switch (mode_value) { |
| 559 LOG(WARNING) << "A centrally-administered policy disables the use of" | 516 case kPolicyNoProxyServerMode: |
| 560 << " a proxy but also specifies an explicit proxy" | 517 if (server || pac_url || bypass_list) { |
| 561 << " configuration."; | 518 LOG(WARNING) << "A centrally-administered policy disables the use of" |
| 519 << " a proxy but also specifies an explicit proxy" | |
| 520 << " configuration."; | |
| 521 return false; | |
| 522 } | |
| 523 break; | |
| 524 case kPolicyAutoDetectProxyMode: | |
| 525 if (server || bypass_list) { | |
| 526 LOG(WARNING) << "A centrally-administered policy dictates that a proxy" | |
| 527 << " shall be auto configured but specifies fixed proxy" | |
| 528 << " servers or a by-pass list."; | |
| 529 return false; | |
| 530 } | |
| 531 break; | |
| 532 case kPolicyManuallyConfiguredProxyMode: | |
| 533 if (!server) { | |
| 534 LOG(WARNING) << "A centrally-administered policy dictates that the" | |
| 535 << " system proxy settings should use fixed proxy servers" | |
| 536 << " without specifying which ones."; | |
| 537 return false; | |
| 538 } | |
| 539 if (pac_url) { | |
| 540 LOG(WARNING) << "A centrally-administered policy dictates that the" | |
| 541 << " system proxy settings should use fixed proxy servers" | |
| 542 << " but also specifies a PAC script."; | |
| 543 return false; | |
| 544 } | |
| 545 break; | |
| 546 case kPolicyUseSystemProxyMode: | |
| 547 if (server || pac_url || bypass_list) { | |
| 548 LOG(WARNING) << "A centrally-administered policy dictates that the" | |
| 549 << " system proxy settings should be used but also " | |
| 550 << " specifies an explicit proxy configuration."; | |
| 551 return false; | |
| 552 } | |
| 553 break; | |
| 554 default: | |
| 555 LOG(WARNING) << "Invalid proxy mode " << mode_value; | |
| 556 return false; | |
| 562 } | 557 } |
| 558 return true; | |
| 559 } | |
| 563 | 560 |
| 564 if (warn_about_proxy_system_config) { | 561 void ConfigurationPolicyPrefStore::ApplyProxySettings() { |
| 565 LOG(WARNING) << "A centrally-administered policy dictates that the" | 562 if (!HasProxyPolicy(kPolicyProxyMode)) |
| 566 << " system proxy settings should be used but also specifies" | 563 return; |
| 567 << " an explicit proxy configuration."; | 564 |
| 565 int int_mode; | |
| 566 CHECK(proxy_policies_[kPolicyProxyMode]->GetAsInteger(&int_mode)); | |
| 567 ProxyPrefs::ProxyMode mode; | |
| 568 switch (int_mode) { | |
| 569 case kPolicyNoProxyServerMode: | |
|
Mattias Nissler (ping if slow)
2010/12/22 16:23:39
fix case statement indentation.
battre
2010/12/22 16:32:03
Done.
| |
| 570 mode = ProxyPrefs::kModeDirect; | |
| 571 break; | |
| 572 case kPolicyAutoDetectProxyMode: | |
| 573 mode = ProxyPrefs::kModeAutoDetect; | |
| 574 if (HasProxyPolicy(kPolicyProxyPacUrl)) | |
| 575 mode = ProxyPrefs::kModePacScript; | |
| 576 break; | |
| 577 case kPolicyManuallyConfiguredProxyMode: | |
| 578 mode = ProxyPrefs::kModeFixedServers; | |
| 579 break; | |
| 580 case kPolicyUseSystemProxyMode: | |
| 581 mode = ProxyPrefs::kModeSystem; | |
| 582 break; | |
| 583 default: | |
| 584 mode = ProxyPrefs::kModeDirect; | |
| 585 NOTREACHED(); | |
| 568 } | 586 } |
| 587 prefs_->Set(prefs::kProxyMode, Value::CreateIntegerValue(mode)); | |
| 569 | 588 |
| 570 // If the policy was a proxy policy, cleanup |value|. | 589 if (HasProxyPolicy(kPolicyProxyServer)) { |
| 571 if (result && value) | 590 prefs_->Set(prefs::kProxyServer, proxy_policies_[kPolicyProxyServer]); |
| 572 delete value; | 591 proxy_policies_[kPolicyProxyServer] = NULL; |
| 573 return result; | 592 } else { |
| 593 prefs_->Set(prefs::kProxyServer, Value::CreateNullValue()); | |
| 594 } | |
| 595 if (HasProxyPolicy(kPolicyProxyPacUrl)) { | |
| 596 prefs_->Set(prefs::kProxyPacUrl, proxy_policies_[kPolicyProxyPacUrl]); | |
| 597 proxy_policies_[kPolicyProxyPacUrl] = NULL; | |
| 598 } else { | |
| 599 prefs_->Set(prefs::kProxyPacUrl, Value::CreateNullValue()); | |
| 600 } | |
| 601 if (HasProxyPolicy(kPolicyProxyBypassList)) { | |
| 602 prefs_->Set(prefs::kProxyBypassList, | |
| 603 proxy_policies_[kPolicyProxyBypassList]); | |
| 604 proxy_policies_[kPolicyProxyBypassList] = NULL; | |
| 605 } else { | |
| 606 prefs_->Set(prefs::kProxyBypassList, Value::CreateNullValue()); | |
| 607 } | |
| 574 } | 608 } |
| 575 | 609 |
| 576 bool ConfigurationPolicyPrefStore::ApplySyncPolicy( | 610 bool ConfigurationPolicyPrefStore::ApplySyncPolicy( |
| 577 ConfigurationPolicyType policy, Value* value) { | 611 ConfigurationPolicyType policy, Value* value) { |
| 578 if (policy == kPolicySyncDisabled) { | 612 if (policy == kPolicySyncDisabled) { |
| 579 bool disable_sync; | 613 bool disable_sync; |
| 580 if (value->GetAsBoolean(&disable_sync) && disable_sync) | 614 if (value->GetAsBoolean(&disable_sync) && disable_sync) |
| 581 prefs_->Set(prefs::kSyncManaged, value); | 615 prefs_->Set(prefs::kSyncManaged, value); |
| 582 else | 616 else |
| 583 delete value; | 617 delete value; |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 671 std::string()); | 705 std::string()); |
| 672 return; | 706 return; |
| 673 } | 707 } |
| 674 } | 708 } |
| 675 // Required entries are not there. Remove any related entries. | 709 // Required entries are not there. Remove any related entries. |
| 676 RemovePreferencesOfMap(kDefaultSearchPolicyMap, | 710 RemovePreferencesOfMap(kDefaultSearchPolicyMap, |
| 677 arraysize(kDefaultSearchPolicyMap)); | 711 arraysize(kDefaultSearchPolicyMap)); |
| 678 } | 712 } |
| 679 | 713 |
| 680 } // namespace policy | 714 } // namespace policy |
| OLD | NEW |