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

Side by Side Diff: chrome/browser/search_engines/default_search_manager.cc

Issue 270533007: Some refactorings to facilitate a larger change to TemplateURLService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/search_engines/template_url_service.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "chrome/browser/search_engines/default_search_manager.h" 5 #include "chrome/browser/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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 } 92 }
93 93
94 DefaultSearchManager::~DefaultSearchManager() { 94 DefaultSearchManager::~DefaultSearchManager() {
95 } 95 }
96 96
97 // static 97 // static
98 void DefaultSearchManager::RegisterProfilePrefs( 98 void DefaultSearchManager::RegisterProfilePrefs(
99 user_prefs::PrefRegistrySyncable* registry) { 99 user_prefs::PrefRegistrySyncable* registry) {
100 registry->RegisterDictionaryPref( 100 registry->RegisterDictionaryPref(
101 kDefaultSearchProviderDataPrefName, 101 kDefaultSearchProviderDataPrefName,
102 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); 102 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
erikwright (departed) 2014/05/08 01:27:37 This was accidentally committed as SYNCABLE.
103 } 103 }
104 104
105 // static 105 // static
106 void DefaultSearchManager::AddPrefValueToMap(base::DictionaryValue* value, 106 void DefaultSearchManager::AddPrefValueToMap(base::DictionaryValue* value,
107 PrefValueMap* pref_value_map) { 107 PrefValueMap* pref_value_map) {
108 pref_value_map->SetValue(kDefaultSearchProviderDataPrefName, value); 108 pref_value_map->SetValue(kDefaultSearchProviderDataPrefName, value);
109 } 109 }
110 110
111 TemplateURLData* DefaultSearchManager::GetDefaultSearchEngine( 111 TemplateURLData* DefaultSearchManager::GetDefaultSearchEngine(
112 Source* source) const { 112 Source* source) const {
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
396 MergePrefsDataWithPrepopulated(); 396 MergePrefsDataWithPrepopulated();
397 } 397 }
398 398
399 void DefaultSearchManager::NotifyObserver() { 399 void DefaultSearchManager::NotifyObserver() {
400 if (!change_observer_.is_null()) { 400 if (!change_observer_.is_null()) {
401 Source source = FROM_FALLBACK; 401 Source source = FROM_FALLBACK;
402 TemplateURLData* data = GetDefaultSearchEngine(&source); 402 TemplateURLData* data = GetDefaultSearchEngine(&source);
403 change_observer_.Run(data, source); 403 change_observer_.Run(data, source);
404 } 404 }
405 } 405 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/search_engines/template_url_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698