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

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

Issue 11552020: Add search_terms_replacement_key field to TemplateURL. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comments now describe a simpler behavior for the parameter. Created 7 years, 11 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 "chrome/browser/google/google_url_tracker_factory.h" 7 #include "chrome/browser/google/google_url_tracker_factory.h"
8 #include "chrome/browser/history/history_service_factory.h" 8 #include "chrome/browser/history/history_service_factory.h"
9 #include "chrome/browser/prefs/pref_service.h" 9 #include "chrome/browser/prefs/pref_service.h"
10 #include "chrome/browser/profiles/profile_dependency_manager.h" 10 #include "chrome/browser/profiles/profile_dependency_manager.h"
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 std::string(), 73 std::string(),
74 PrefServiceSyncable::UNSYNCABLE_PREF); 74 PrefServiceSyncable::UNSYNCABLE_PREF);
75 prefs->RegisterStringPref(prefs::kDefaultSearchProviderIconURL, 75 prefs->RegisterStringPref(prefs::kDefaultSearchProviderIconURL,
76 std::string(), 76 std::string(),
77 PrefServiceSyncable::UNSYNCABLE_PREF); 77 PrefServiceSyncable::UNSYNCABLE_PREF);
78 prefs->RegisterStringPref(prefs::kDefaultSearchProviderEncodings, 78 prefs->RegisterStringPref(prefs::kDefaultSearchProviderEncodings,
79 std::string(), 79 std::string(),
80 PrefServiceSyncable::UNSYNCABLE_PREF); 80 PrefServiceSyncable::UNSYNCABLE_PREF);
81 prefs->RegisterListPref(prefs::kDefaultSearchProviderAlternateURLs, 81 prefs->RegisterListPref(prefs::kDefaultSearchProviderAlternateURLs,
82 PrefServiceSyncable::UNSYNCABLE_PREF); 82 PrefServiceSyncable::UNSYNCABLE_PREF);
83 prefs->RegisterStringPref(
84 prefs::kDefaultSearchProviderSearchTermsReplacementKey,
85 std::string(),
86 PrefServiceSyncable::UNSYNCABLE_PREF);
83 } 87 }
84 88
85 bool TemplateURLServiceFactory::ServiceRedirectedInIncognito() const { 89 bool TemplateURLServiceFactory::ServiceRedirectedInIncognito() const {
86 return true; 90 return true;
87 } 91 }
88 92
89 bool TemplateURLServiceFactory::ServiceIsNULLWhileTesting() const { 93 bool TemplateURLServiceFactory::ServiceIsNULLWhileTesting() const {
90 return true; 94 return true;
91 } 95 }
92 96
93 void TemplateURLServiceFactory::ProfileShutdown(Profile* profile) { 97 void TemplateURLServiceFactory::ProfileShutdown(Profile* profile) {
94 // We shutdown AND destroy the TemplateURLService during this pass. 98 // We shutdown AND destroy the TemplateURLService during this pass.
95 // TemplateURLService schedules a task on the WebDataService from its 99 // TemplateURLService schedules a task on the WebDataService from its
96 // destructor. Delete it first to ensure the task gets scheduled before we 100 // destructor. Delete it first to ensure the task gets scheduled before we
97 // shut down the database. 101 // shut down the database.
98 ProfileKeyedServiceFactory::ProfileShutdown(profile); 102 ProfileKeyedServiceFactory::ProfileShutdown(profile);
99 ProfileKeyedServiceFactory::ProfileDestroyed(profile); 103 ProfileKeyedServiceFactory::ProfileDestroyed(profile);
100 } 104 }
101 105
102 void TemplateURLServiceFactory::ProfileDestroyed(Profile* profile) { 106 void TemplateURLServiceFactory::ProfileDestroyed(Profile* profile) {
103 // Don't double delete. 107 // Don't double delete.
104 } 108 }
OLDNEW
« no previous file with comments | « chrome/browser/search_engines/template_url_service.cc ('k') | chrome/browser/webdata/keyword_table.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698