OLD | NEW |
---|---|
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/extensions/api/settings_private/prefs_util.h" | 5 #include "chrome/browser/extensions/api/settings_private/prefs_util.h" |
6 | 6 |
7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
8 #include "chrome/browser/browser_process.h" | 8 #include "chrome/browser/browser_process.h" |
9 #include "chrome/browser/extensions/chrome_extension_function.h" | 9 #include "chrome/browser/extensions/chrome_extension_function.h" |
10 #include "chrome/browser/extensions/settings_api_helpers.h" | |
11 #include "chrome/browser/prefs/session_startup_pref.h" | |
10 #include "chrome/browser/profiles/profile.h" | 12 #include "chrome/browser/profiles/profile.h" |
11 #include "chrome/common/pref_names.h" | 13 #include "chrome/common/pref_names.h" |
12 #include "components/autofill/core/common/autofill_pref_names.h" | 14 #include "components/autofill/core/common/autofill_pref_names.h" |
13 #include "components/bookmarks/common/bookmark_pref_names.h" | 15 #include "components/bookmarks/common/bookmark_pref_names.h" |
14 #include "components/browsing_data/core/pref_names.h" | 16 #include "components/browsing_data/core/pref_names.h" |
15 #include "components/content_settings/core/common/pref_names.h" | 17 #include "components/content_settings/core/common/pref_names.h" |
16 #include "components/drive/drive_pref_names.h" | 18 #include "components/drive/drive_pref_names.h" |
17 #include "components/password_manager/core/common/password_manager_pref_names.h" | 19 #include "components/password_manager/core/common/password_manager_pref_names.h" |
18 #include "components/prefs/pref_service.h" | 20 #include "components/prefs/pref_service.h" |
19 #include "components/proxy_config/proxy_config_pref_names.h" | 21 #include "components/proxy_config/proxy_config_pref_names.h" |
20 #include "components/safe_browsing_db/safe_browsing_prefs.h" | 22 #include "components/safe_browsing_db/safe_browsing_prefs.h" |
23 #include "components/search_engines/search_engines_pref_names.h" | |
21 #include "components/spellcheck/browser/pref_names.h" | 24 #include "components/spellcheck/browser/pref_names.h" |
22 #include "components/translate/core/browser/translate_prefs.h" | 25 #include "components/translate/core/browser/translate_prefs.h" |
23 #include "components/translate/core/common/translate_pref_names.h" | 26 #include "components/translate/core/common/translate_pref_names.h" |
24 #include "components/url_formatter/url_fixer.h" | 27 #include "components/url_formatter/url_fixer.h" |
25 #include "extensions/browser/extension_pref_value_map.h" | 28 #include "extensions/browser/extension_pref_value_map.h" |
26 #include "extensions/browser/extension_pref_value_map_factory.h" | 29 #include "extensions/browser/extension_pref_value_map_factory.h" |
27 #include "extensions/browser/extension_registry.h" | 30 #include "extensions/browser/extension_registry.h" |
31 #include "extensions/browser/extension_system.h" | |
32 #include "extensions/browser/management_policy.h" | |
28 #include "extensions/common/extension.h" | 33 #include "extensions/common/extension.h" |
29 | 34 |
30 #if defined(OS_CHROMEOS) | 35 #if defined(OS_CHROMEOS) |
31 #include "chrome/browser/chromeos/ownership/owner_settings_service_chromeos.h" | 36 #include "chrome/browser/chromeos/ownership/owner_settings_service_chromeos.h" |
32 #include "chrome/browser/chromeos/ownership/owner_settings_service_chromeos_fact ory.h" | 37 #include "chrome/browser/chromeos/ownership/owner_settings_service_chromeos_fact ory.h" |
33 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" | 38 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" |
34 #include "chrome/browser/chromeos/profiles/profile_helper.h" | 39 #include "chrome/browser/chromeos/profiles/profile_helper.h" |
35 #include "chrome/browser/chromeos/settings/cros_settings.h" | 40 #include "chrome/browser/chromeos/settings/cros_settings.h" |
36 #include "chromeos/settings/cros_settings_names.h" | 41 #include "chromeos/settings/cros_settings_names.h" |
37 #endif | 42 #endif |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
85 (*s_whitelist)[::prefs::kShowHomeButton] = | 90 (*s_whitelist)[::prefs::kShowHomeButton] = |
86 settings_private::PrefType::PREF_TYPE_BOOLEAN; | 91 settings_private::PrefType::PREF_TYPE_BOOLEAN; |
87 | 92 |
88 // Appearance settings. | 93 // Appearance settings. |
89 (*s_whitelist)[::prefs::kCurrentThemeID] = | 94 (*s_whitelist)[::prefs::kCurrentThemeID] = |
90 settings_private::PrefType::PREF_TYPE_STRING; | 95 settings_private::PrefType::PREF_TYPE_STRING; |
91 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) | 96 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) |
92 (*s_whitelist)[::prefs::kUsesSystemTheme] = | 97 (*s_whitelist)[::prefs::kUsesSystemTheme] = |
93 settings_private::PrefType::PREF_TYPE_BOOLEAN; | 98 settings_private::PrefType::PREF_TYPE_BOOLEAN; |
94 #endif | 99 #endif |
100 (*s_whitelist)[::prefs::kHomePage] = | |
101 settings_private::PrefType::PREF_TYPE_URL; | |
102 (*s_whitelist)[::prefs::kHomePageIsNewTabPage] = | |
103 settings_private::PrefType::PREF_TYPE_BOOLEAN; | |
95 (*s_whitelist)[::prefs::kWebKitDefaultFixedFontSize] = | 104 (*s_whitelist)[::prefs::kWebKitDefaultFixedFontSize] = |
96 settings_private::PrefType::PREF_TYPE_NUMBER; | 105 settings_private::PrefType::PREF_TYPE_NUMBER; |
97 (*s_whitelist)[::prefs::kWebKitDefaultFontSize] = | 106 (*s_whitelist)[::prefs::kWebKitDefaultFontSize] = |
98 settings_private::PrefType::PREF_TYPE_NUMBER; | 107 settings_private::PrefType::PREF_TYPE_NUMBER; |
99 (*s_whitelist)[::prefs::kWebKitMinimumFontSize] = | 108 (*s_whitelist)[::prefs::kWebKitMinimumFontSize] = |
100 settings_private::PrefType::PREF_TYPE_NUMBER; | 109 settings_private::PrefType::PREF_TYPE_NUMBER; |
101 (*s_whitelist)[::prefs::kWebKitFixedFontFamily] = | 110 (*s_whitelist)[::prefs::kWebKitFixedFontFamily] = |
102 settings_private::PrefType::PREF_TYPE_STRING; | 111 settings_private::PrefType::PREF_TYPE_STRING; |
103 (*s_whitelist)[::prefs::kWebKitSansSerifFontFamily] = | 112 (*s_whitelist)[::prefs::kWebKitSansSerifFontFamily] = |
104 settings_private::PrefType::PREF_TYPE_STRING; | 113 settings_private::PrefType::PREF_TYPE_STRING; |
105 (*s_whitelist)[::prefs::kWebKitSerifFontFamily] = | 114 (*s_whitelist)[::prefs::kWebKitSerifFontFamily] = |
106 settings_private::PrefType::PREF_TYPE_STRING; | 115 settings_private::PrefType::PREF_TYPE_STRING; |
107 (*s_whitelist)[::prefs::kWebKitStandardFontFamily] = | 116 (*s_whitelist)[::prefs::kWebKitStandardFontFamily] = |
108 settings_private::PrefType::PREF_TYPE_STRING; | 117 settings_private::PrefType::PREF_TYPE_STRING; |
109 (*s_whitelist)[::prefs::kDefaultCharset] = | 118 (*s_whitelist)[::prefs::kDefaultCharset] = |
110 settings_private::PrefType::PREF_TYPE_STRING; | 119 settings_private::PrefType::PREF_TYPE_STRING; |
111 | 120 |
121 // On startup. | |
122 (*s_whitelist)[::prefs::kRestoreOnStartup] = | |
123 settings_private::PrefType::PREF_TYPE_NUMBER; | |
124 (*s_whitelist)[::prefs::kURLsToRestoreOnStartup] = | |
125 settings_private::PrefType::PREF_TYPE_LIST; | |
126 | |
112 // Downloads settings. | 127 // Downloads settings. |
113 (*s_whitelist)[::prefs::kDownloadDefaultDirectory] = | 128 (*s_whitelist)[::prefs::kDownloadDefaultDirectory] = |
114 settings_private::PrefType::PREF_TYPE_STRING; | 129 settings_private::PrefType::PREF_TYPE_STRING; |
115 (*s_whitelist)[::prefs::kPromptForDownload] = | 130 (*s_whitelist)[::prefs::kPromptForDownload] = |
116 settings_private::PrefType::PREF_TYPE_BOOLEAN; | 131 settings_private::PrefType::PREF_TYPE_BOOLEAN; |
117 (*s_whitelist)[drive::prefs::kDisableDrive] = | 132 (*s_whitelist)[drive::prefs::kDisableDrive] = |
118 settings_private::PrefType::PREF_TYPE_BOOLEAN; | 133 settings_private::PrefType::PREF_TYPE_BOOLEAN; |
119 | 134 |
120 // Printing settings. | 135 // Printing settings. |
121 (*s_whitelist)[::prefs::kLocalDiscoveryNotificationsEnabled] = | 136 (*s_whitelist)[::prefs::kLocalDiscoveryNotificationsEnabled] = |
122 settings_private::PrefType::PREF_TYPE_BOOLEAN; | 137 settings_private::PrefType::PREF_TYPE_BOOLEAN; |
123 | 138 |
124 // Miscelaneous. TODO(stevenjb): categorize. | 139 // Miscellaneous. TODO(stevenjb): categorize. |
125 (*s_whitelist)[::prefs::kEnableDoNotTrack] = | 140 (*s_whitelist)[::prefs::kEnableDoNotTrack] = |
126 settings_private::PrefType::PREF_TYPE_BOOLEAN; | 141 settings_private::PrefType::PREF_TYPE_BOOLEAN; |
127 (*s_whitelist)[::prefs::kHomePage] = | |
128 settings_private::PrefType::PREF_TYPE_URL; | |
129 (*s_whitelist)[::prefs::kHomePageIsNewTabPage] = | |
130 settings_private::PrefType::PREF_TYPE_BOOLEAN; | |
131 (*s_whitelist)[::prefs::kApplicationLocale] = | 142 (*s_whitelist)[::prefs::kApplicationLocale] = |
132 settings_private::PrefType::PREF_TYPE_STRING; | 143 settings_private::PrefType::PREF_TYPE_STRING; |
133 (*s_whitelist)[::prefs::kNetworkPredictionOptions] = | 144 (*s_whitelist)[::prefs::kNetworkPredictionOptions] = |
134 settings_private::PrefType::PREF_TYPE_NUMBER; | 145 settings_private::PrefType::PREF_TYPE_NUMBER; |
135 (*s_whitelist)[password_manager::prefs::kPasswordManagerSavingEnabled] = | 146 (*s_whitelist)[password_manager::prefs::kPasswordManagerSavingEnabled] = |
136 settings_private::PrefType::PREF_TYPE_BOOLEAN; | 147 settings_private::PrefType::PREF_TYPE_BOOLEAN; |
137 (*s_whitelist)[password_manager::prefs::kCredentialsEnableAutosignin] = | 148 (*s_whitelist)[password_manager::prefs::kCredentialsEnableAutosignin] = |
138 settings_private::PrefType::PREF_TYPE_BOOLEAN; | 149 settings_private::PrefType::PREF_TYPE_BOOLEAN; |
139 (*s_whitelist)[::prefs::kSafeBrowsingEnabled] = | 150 (*s_whitelist)[::prefs::kSafeBrowsingEnabled] = |
140 settings_private::PrefType::PREF_TYPE_BOOLEAN; | 151 settings_private::PrefType::PREF_TYPE_BOOLEAN; |
141 (*s_whitelist)[::prefs::kSafeBrowsingExtendedReportingEnabled] = | 152 (*s_whitelist)[::prefs::kSafeBrowsingExtendedReportingEnabled] = |
142 settings_private::PrefType::PREF_TYPE_BOOLEAN; | 153 settings_private::PrefType::PREF_TYPE_BOOLEAN; |
143 (*s_whitelist)[::prefs::kSearchSuggestEnabled] = | 154 (*s_whitelist)[::prefs::kSearchSuggestEnabled] = |
144 settings_private::PrefType::PREF_TYPE_BOOLEAN; | 155 settings_private::PrefType::PREF_TYPE_BOOLEAN; |
145 (*s_whitelist)[::prefs::kRestoreOnStartup] = | |
146 settings_private::PrefType::PREF_TYPE_NUMBER; | |
147 (*s_whitelist)[::prefs::kURLsToRestoreOnStartup] = | |
148 settings_private::PrefType::PREF_TYPE_LIST; | |
149 (*s_whitelist)[spellcheck::prefs::kSpellCheckDictionaries] = | 156 (*s_whitelist)[spellcheck::prefs::kSpellCheckDictionaries] = |
150 settings_private::PrefType::PREF_TYPE_LIST; | 157 settings_private::PrefType::PREF_TYPE_LIST; |
151 (*s_whitelist)[spellcheck::prefs::kSpellCheckUseSpellingService] = | 158 (*s_whitelist)[spellcheck::prefs::kSpellCheckUseSpellingService] = |
152 settings_private::PrefType::PREF_TYPE_BOOLEAN; | 159 settings_private::PrefType::PREF_TYPE_BOOLEAN; |
153 (*s_whitelist)[::prefs::kEnableTranslate] = | 160 (*s_whitelist)[::prefs::kEnableTranslate] = |
154 settings_private::PrefType::PREF_TYPE_BOOLEAN; | 161 settings_private::PrefType::PREF_TYPE_BOOLEAN; |
155 (*s_whitelist)[translate::TranslatePrefs::kPrefTranslateBlockedLanguages] = | 162 (*s_whitelist)[translate::TranslatePrefs::kPrefTranslateBlockedLanguages] = |
156 settings_private::PrefType::PREF_TYPE_LIST; | 163 settings_private::PrefType::PREF_TYPE_LIST; |
157 | 164 |
158 // Site Settings prefs. | 165 // Site Settings prefs. |
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
375 if (!pref) | 382 if (!pref) |
376 return nullptr; | 383 return nullptr; |
377 pref_object.reset(new settings_private::PrefObject()); | 384 pref_object.reset(new settings_private::PrefObject()); |
378 pref_object->key = pref->name(); | 385 pref_object->key = pref->name(); |
379 pref_object->type = GetType(name, pref->GetType()); | 386 pref_object->type = GetType(name, pref->GetType()); |
380 pref_object->value.reset(pref->GetValue()->DeepCopy()); | 387 pref_object->value.reset(pref->GetValue()->DeepCopy()); |
381 } | 388 } |
382 | 389 |
383 #if defined(OS_CHROMEOS) | 390 #if defined(OS_CHROMEOS) |
384 if (IsPrefPrimaryUserControlled(name)) { | 391 if (IsPrefPrimaryUserControlled(name)) { |
385 pref_object->policy_source = | 392 pref_object->controlled_by = |
386 settings_private::PolicySource::POLICY_SOURCE_PRIMARY_USER; | 393 settings_private::ControlledBy::CONTROLLED_BY_PRIMARY_USER; |
387 pref_object->policy_enforcement = | 394 pref_object->enforcement = |
388 settings_private::PolicyEnforcement::POLICY_ENFORCEMENT_ENFORCED; | 395 settings_private::Enforcement::ENFORCEMENT_ENFORCED; |
389 pref_object->policy_source_name.reset( | 396 pref_object->controlled_by_name.reset( |
390 new std::string(user_manager::UserManager::Get() | 397 new std::string(user_manager::UserManager::Get() |
391 ->GetPrimaryUser() | 398 ->GetPrimaryUser() |
392 ->GetAccountId() | 399 ->GetAccountId() |
393 .GetUserEmail())); | 400 .GetUserEmail())); |
394 return pref_object; | 401 return pref_object; |
395 } | 402 } |
403 | |
396 if (IsPrefEnterpriseManaged(name)) { | 404 if (IsPrefEnterpriseManaged(name)) { |
397 // Enterprise managed prefs are treated the same as device policy restricted | 405 // Enterprise managed prefs are treated the same as device policy restricted |
398 // prefs in the UI. | 406 // prefs in the UI. |
399 pref_object->policy_source = | 407 pref_object->controlled_by = |
400 settings_private::PolicySource::POLICY_SOURCE_DEVICE_POLICY; | 408 settings_private::ControlledBy::CONTROLLED_BY_DEVICE_POLICY; |
401 pref_object->policy_enforcement = | 409 pref_object->enforcement = |
402 settings_private::PolicyEnforcement::POLICY_ENFORCEMENT_ENFORCED; | 410 settings_private::Enforcement::ENFORCEMENT_ENFORCED; |
403 return pref_object; | 411 return pref_object; |
404 } | 412 } |
405 #endif | 413 #endif |
406 | 414 |
407 if (pref && pref->IsManaged()) { | 415 if (pref && pref->IsManaged()) { |
408 pref_object->policy_source = | 416 pref_object->controlled_by = |
409 settings_private::PolicySource::POLICY_SOURCE_USER_POLICY; | 417 settings_private::ControlledBy::CONTROLLED_BY_USER_POLICY; |
410 pref_object->policy_enforcement = | 418 pref_object->enforcement = |
411 settings_private::PolicyEnforcement::POLICY_ENFORCEMENT_ENFORCED; | 419 settings_private::Enforcement::ENFORCEMENT_ENFORCED; |
412 return pref_object; | 420 return pref_object; |
413 } | 421 } |
422 | |
414 if (pref && pref->IsRecommended()) { | 423 if (pref && pref->IsRecommended()) { |
415 pref_object->policy_source = | 424 pref_object->controlled_by = |
416 settings_private::PolicySource::POLICY_SOURCE_USER_POLICY; | 425 settings_private::ControlledBy::CONTROLLED_BY_USER_POLICY; |
417 pref_object->policy_enforcement = | 426 pref_object->enforcement = |
418 settings_private::PolicyEnforcement::POLICY_ENFORCEMENT_RECOMMENDED; | 427 settings_private::Enforcement::ENFORCEMENT_RECOMMENDED; |
419 pref_object->recommended_value.reset( | 428 pref_object->recommended_value.reset( |
420 pref->GetRecommendedValue()->DeepCopy()); | 429 pref->GetRecommendedValue()->DeepCopy()); |
421 return pref_object; | 430 return pref_object; |
422 } | 431 } |
423 | 432 |
424 #if defined(OS_CHROMEOS) | 433 #if defined(OS_CHROMEOS) |
425 if (IsPrefOwnerControlled(name)) { | 434 if (IsPrefOwnerControlled(name)) { |
426 // Check for owner controlled after managed checks because if there is a | 435 // Check for owner controlled after managed checks because if there is a |
427 // device policy there is no "owner". (In the unlikely case that both | 436 // device policy there is no "owner". (In the unlikely case that both |
428 // situations apply, either badge is potentially relevant, so the order | 437 // situations apply, either badge is potentially relevant, so the order |
429 // is somewhat arbitrary). | 438 // is somewhat arbitrary). |
430 pref_object->policy_source = | 439 pref_object->controlled_by = |
431 settings_private::PolicySource::POLICY_SOURCE_OWNER; | 440 settings_private::ControlledBy::CONTROLLED_BY_OWNER; |
432 pref_object->policy_enforcement = | 441 pref_object->enforcement = |
433 settings_private::PolicyEnforcement::POLICY_ENFORCEMENT_ENFORCED; | 442 settings_private::Enforcement::ENFORCEMENT_ENFORCED; |
434 pref_object->policy_source_name.reset(new std::string( | 443 pref_object->controlled_by_name.reset(new std::string( |
435 user_manager::UserManager::Get()->GetOwnerAccountId().GetUserEmail())); | 444 user_manager::UserManager::Get()->GetOwnerAccountId().GetUserEmail())); |
436 return pref_object; | 445 return pref_object; |
437 } | 446 } |
438 #endif | 447 #endif |
439 | 448 |
440 if (pref && pref->IsExtensionControlled()) { | 449 const Extension* extension = GetExtensionControllingPref(*pref_object); |
Dan Beam
2017/02/23 01:49:38
i probably broke stuff with this
| |
441 std::string extension_id = | 450 if (extension) { |
442 ExtensionPrefValueMapFactory::GetForBrowserContext(profile_) | 451 pref_object->controlled_by = |
443 ->GetExtensionControllingPref(pref->name()); | 452 settings_private::ControlledBy::CONTROLLED_BY_EXTENSION; |
444 const Extension* extension = ExtensionRegistry::Get(profile_)-> | 453 pref_object->enforcement = |
445 GetExtensionById(extension_id, ExtensionRegistry::ENABLED); | 454 settings_private::Enforcement::ENFORCEMENT_ENFORCED; |
446 if (extension) { | 455 pref_object->extension_id.reset(new std::string(extension->id())); |
447 pref_object->policy_source = | 456 pref_object->controlled_by_name.reset(new std::string(extension->name())); |
448 settings_private::PolicySource::POLICY_SOURCE_EXTENSION; | 457 bool can_be_disabled = !ExtensionSystem::Get(profile_)->management_policy() |
449 pref_object->policy_enforcement = | 458 ->MustRemainEnabled(extension, nullptr); |
450 settings_private::PolicyEnforcement::POLICY_ENFORCEMENT_ENFORCED; | 459 pref_object->extension_can_be_disabled.reset(new bool(can_be_disabled)); |
451 pref_object->extension_id.reset(new std::string(extension_id)); | |
452 pref_object->policy_source_name.reset(new std::string(extension->name())); | |
453 return pref_object; | |
454 } | |
455 } | |
456 if (pref && (!pref->IsUserModifiable() || IsPrefSupervisorControlled(name))) { | |
457 // TODO(stevenjb): Investigate whether either of these should be badged. | |
458 pref_object->read_only.reset(new bool(true)); | |
459 return pref_object; | 460 return pref_object; |
460 } | 461 } |
461 | 462 |
463 // TODO(dbeam): surface !IsUserModifiable or IsPrefSupervisorControlled? | |
464 | |
462 return pref_object; | 465 return pref_object; |
463 } | 466 } |
464 | 467 |
465 PrefsUtil::SetPrefResult PrefsUtil::SetPref(const std::string& pref_name, | 468 PrefsUtil::SetPrefResult PrefsUtil::SetPref(const std::string& pref_name, |
466 const base::Value* value) { | 469 const base::Value* value) { |
467 if (IsCrosSetting(pref_name)) | 470 if (IsCrosSetting(pref_name)) |
468 return SetCrosSettingsPref(pref_name, value); | 471 return SetCrosSettingsPref(pref_name, value); |
469 | 472 |
470 PrefService* pref_service = FindServiceForPref(pref_name); | 473 PrefService* pref_service = FindServiceForPref(pref_name); |
471 | 474 |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
673 } | 676 } |
674 | 677 |
675 bool PrefsUtil::IsCrosSetting(const std::string& pref_name) { | 678 bool PrefsUtil::IsCrosSetting(const std::string& pref_name) { |
676 #if defined(OS_CHROMEOS) | 679 #if defined(OS_CHROMEOS) |
677 return CrosSettings::Get()->IsCrosSettings(pref_name); | 680 return CrosSettings::Get()->IsCrosSettings(pref_name); |
678 #else | 681 #else |
679 return false; | 682 return false; |
680 #endif | 683 #endif |
681 } | 684 } |
682 | 685 |
686 const Extension* PrefsUtil::GetExtensionControllingPref( | |
687 const settings_private::PrefObject& pref_object) { | |
688 // Look for specific prefs that might be extension controlled. This generally | |
689 // corresponds with some indiciator that should be shown in the settings UI. | |
690 if (pref_object.key == ::prefs::kHomePage) | |
691 return GetExtensionOverridingHomepage(profile_); | |
692 if (pref_object.key == ::prefs::kURLsToRestoreOnStartup) | |
693 return GetExtensionOverridingStartupPages(profile_); | |
694 if (pref_object.key == ::prefs::kDefaultSearchProviderEnabled) | |
695 return GetExtensionOverridingSearchEngine(profile_); | |
696 if (pref_object.key == proxy_config::prefs::kProxy) | |
697 return GetExtensionOverridingProxy(profile_); | |
698 return nullptr; | |
699 } | |
700 | |
683 } // namespace extensions | 701 } // namespace extensions |
OLD | NEW |