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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
71 PrefService::UNSYNCABLE_PREF); | 71 PrefService::UNSYNCABLE_PREF); |
72 prefs->RegisterStringPref(prefs::kDefaultSearchProviderKeyword, | 72 prefs->RegisterStringPref(prefs::kDefaultSearchProviderKeyword, |
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->RegisterStringPref(prefs::kDefaultSearchProviderAlternateURLs, | |
82 std::string(), | |
Joao da Silva
2012/09/24 09:12:29
Seems like this should be a list pref? (same for t
beaudoin
2012/09/27 17:37:13
Done.
| |
83 PrefService::UNSYNCABLE_PREF); | |
81 } | 84 } |
82 | 85 |
83 bool TemplateURLServiceFactory::ServiceRedirectedInIncognito() const { | 86 bool TemplateURLServiceFactory::ServiceRedirectedInIncognito() const { |
84 return true; | 87 return true; |
85 } | 88 } |
86 | 89 |
87 bool TemplateURLServiceFactory::ServiceIsNULLWhileTesting() const { | 90 bool TemplateURLServiceFactory::ServiceIsNULLWhileTesting() const { |
88 return true; | 91 return true; |
89 } | 92 } |
90 | 93 |
91 void TemplateURLServiceFactory::ProfileShutdown(Profile* profile) { | 94 void TemplateURLServiceFactory::ProfileShutdown(Profile* profile) { |
92 // We shutdown AND destroy the TemplateURLService during this pass. | 95 // We shutdown AND destroy the TemplateURLService during this pass. |
93 // TemplateURLService schedules a task on the WebDataService from its | 96 // TemplateURLService schedules a task on the WebDataService from its |
94 // destructor. Delete it first to ensure the task gets scheduled before we | 97 // destructor. Delete it first to ensure the task gets scheduled before we |
95 // shut down the database. | 98 // shut down the database. |
96 ProfileKeyedServiceFactory::ProfileShutdown(profile); | 99 ProfileKeyedServiceFactory::ProfileShutdown(profile); |
97 ProfileKeyedServiceFactory::ProfileDestroyed(profile); | 100 ProfileKeyedServiceFactory::ProfileDestroyed(profile); |
98 } | 101 } |
99 | 102 |
100 void TemplateURLServiceFactory::ProfileDestroyed(Profile* profile) { | 103 void TemplateURLServiceFactory::ProfileDestroyed(Profile* profile) { |
101 // Don't double delete. | 104 // Don't double delete. |
102 } | 105 } |
OLD | NEW |