OLD | NEW |
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 Loading... |
73 std::string(), | 73 std::string(), |
74 PrefService::UNSYNCABLE_PREF); | 74 PrefService::UNSYNCABLE_PREF); |
75 prefs->RegisterStringPref(prefs::kDefaultSearchProviderIconURL, | 75 prefs->RegisterStringPref(prefs::kDefaultSearchProviderIconURL, |
76 std::string(), | 76 std::string(), |
77 PrefService::UNSYNCABLE_PREF); | 77 PrefService::UNSYNCABLE_PREF); |
78 prefs->RegisterStringPref(prefs::kDefaultSearchProviderEncodings, | 78 prefs->RegisterStringPref(prefs::kDefaultSearchProviderEncodings, |
79 std::string(), | 79 std::string(), |
80 PrefService::UNSYNCABLE_PREF); | 80 PrefService::UNSYNCABLE_PREF); |
81 prefs->RegisterListPref(prefs::kDefaultSearchProviderAlternateURLs, | 81 prefs->RegisterListPref(prefs::kDefaultSearchProviderAlternateURLs, |
82 PrefService::UNSYNCABLE_PREF); | 82 PrefService::UNSYNCABLE_PREF); |
| 83 prefs->RegisterStringPref( |
| 84 prefs::kDefaultSearchProviderSearchTermsReplacementKey, |
| 85 std::string(), |
| 86 PrefService::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 } |
OLD | NEW |