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

Side by Side Diff: components/search_engines/default_search_manager.cc

Issue 1102733002: Remove most occurences of PrefRegistrySyncable::UNSYNCABLE_PREF (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@prefs-add-reg-funcs
Patch Set: Created 5 years, 8 months 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "components/search_engines/default_search_manager.h" 5 #include "components/search_engines/default_search_manager.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 LoadPrepopulatedDefaultSearch(); 93 LoadPrepopulatedDefaultSearch();
94 LoadDefaultSearchEngineFromPrefs(); 94 LoadDefaultSearchEngineFromPrefs();
95 } 95 }
96 96
97 DefaultSearchManager::~DefaultSearchManager() { 97 DefaultSearchManager::~DefaultSearchManager() {
98 } 98 }
99 99
100 // static 100 // static
101 void DefaultSearchManager::RegisterProfilePrefs( 101 void DefaultSearchManager::RegisterProfilePrefs(
102 user_prefs::PrefRegistrySyncable* registry) { 102 user_prefs::PrefRegistrySyncable* registry) {
103 registry->RegisterDictionaryPref( 103 registry->RegisterDictionaryPref(kDefaultSearchProviderDataPrefName);
104 kDefaultSearchProviderDataPrefName,
105 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
106 } 104 }
107 105
108 // static 106 // static
109 void DefaultSearchManager::AddPrefValueToMap(base::DictionaryValue* value, 107 void DefaultSearchManager::AddPrefValueToMap(base::DictionaryValue* value,
110 PrefValueMap* pref_value_map) { 108 PrefValueMap* pref_value_map) {
111 pref_value_map->SetValue(kDefaultSearchProviderDataPrefName, value); 109 pref_value_map->SetValue(kDefaultSearchProviderDataPrefName, value);
112 } 110 }
113 111
114 // static 112 // static
115 void DefaultSearchManager::SetFallbackSearchEnginesDisabledForTesting( 113 void DefaultSearchManager::SetFallbackSearchEnginesDisabledForTesting(
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
406 MergePrefsDataWithPrepopulated(); 404 MergePrefsDataWithPrepopulated();
407 } 405 }
408 406
409 void DefaultSearchManager::NotifyObserver() { 407 void DefaultSearchManager::NotifyObserver() {
410 if (!change_observer_.is_null()) { 408 if (!change_observer_.is_null()) {
411 Source source = FROM_FALLBACK; 409 Source source = FROM_FALLBACK;
412 TemplateURLData* data = GetDefaultSearchEngine(&source); 410 TemplateURLData* data = GetDefaultSearchEngine(&source);
413 change_observer_.Run(data, source); 411 change_observer_.Run(data, source);
414 } 412 }
415 } 413 }
OLDNEW
« no previous file with comments | « components/policy/core/browser/url_blacklist_manager.cc ('k') | components/search_engines/template_url_prepopulate_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698