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

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

Issue 229763005: Store default search provider data in dictionary pref. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: put constants in a namespace Created 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/template_url_service_factory.h" 5 #include "chrome/browser/search_engines/template_url_service_factory.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/prefs/pref_service.h" 9 #include "base/prefs/pref_service.h"
10 #include "chrome/browser/google/google_url_tracker_factory.h" 10 #include "chrome/browser/google/google_url_tracker_factory.h"
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 registry->RegisterStringPref( 117 registry->RegisterStringPref(
118 prefs::kDefaultSearchProviderEncodings, 118 prefs::kDefaultSearchProviderEncodings,
119 std::string(), 119 std::string(),
120 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); 120 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
121 registry->RegisterListPref(prefs::kDefaultSearchProviderAlternateURLs, 121 registry->RegisterListPref(prefs::kDefaultSearchProviderAlternateURLs,
122 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); 122 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
123 registry->RegisterStringPref( 123 registry->RegisterStringPref(
124 prefs::kDefaultSearchProviderSearchTermsReplacementKey, 124 prefs::kDefaultSearchProviderSearchTermsReplacementKey,
125 std::string(), 125 std::string(),
126 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); 126 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
127 // TODO(caitkp): Set a default value here.
erikwright (departed) 2014/04/22 15:47:24 In fact, the default should simply be NULL based o
Cait (Slow) 2014/04/22 19:54:13 Done.
128 registry->RegisterDictionaryPref(
129 prefs::kDefaultSearchProviderData,
130 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
127 } 131 }
128 132
129 content::BrowserContext* TemplateURLServiceFactory::GetBrowserContextToUse( 133 content::BrowserContext* TemplateURLServiceFactory::GetBrowserContextToUse(
130 content::BrowserContext* context) const { 134 content::BrowserContext* context) const {
131 return chrome::GetBrowserContextRedirectedInIncognito(context); 135 return chrome::GetBrowserContextRedirectedInIncognito(context);
132 } 136 }
133 137
134 bool TemplateURLServiceFactory::ServiceIsNULLWhileTesting() const { 138 bool TemplateURLServiceFactory::ServiceIsNULLWhileTesting() const {
135 return true; 139 return true;
136 } 140 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698