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 } | 81 } |
82 | 82 |
83 bool TemplateURLServiceFactory::ServiceRedirectedInIncognito() { | 83 bool TemplateURLServiceFactory::ServiceRedirectedInIncognito() const { |
84 return true; | 84 return true; |
85 } | 85 } |
86 | 86 |
87 bool TemplateURLServiceFactory::ServiceIsNULLWhileTesting() { | 87 bool TemplateURLServiceFactory::ServiceIsNULLWhileTesting() const { |
88 return true; | 88 return true; |
89 } | 89 } |
90 | 90 |
91 void TemplateURLServiceFactory::ProfileShutdown(Profile* profile) { | 91 void TemplateURLServiceFactory::ProfileShutdown(Profile* profile) { |
92 // We shutdown AND destroy the TemplateURLService during this pass. | 92 // We shutdown AND destroy the TemplateURLService during this pass. |
93 // TemplateURLService schedules a task on the WebDataService from its | 93 // TemplateURLService schedules a task on the WebDataService from its |
94 // destructor. Delete it first to ensure the task gets scheduled before we | 94 // destructor. Delete it first to ensure the task gets scheduled before we |
95 // shut down the database. | 95 // shut down the database. |
96 ProfileKeyedServiceFactory::ProfileShutdown(profile); | 96 ProfileKeyedServiceFactory::ProfileShutdown(profile); |
97 ProfileKeyedServiceFactory::ProfileDestroyed(profile); | 97 ProfileKeyedServiceFactory::ProfileDestroyed(profile); |
98 } | 98 } |
99 | 99 |
100 void TemplateURLServiceFactory::ProfileDestroyed(Profile* profile) { | 100 void TemplateURLServiceFactory::ProfileDestroyed(Profile* profile) { |
101 // Don't double delete. | 101 // Don't double delete. |
102 } | 102 } |
OLD | NEW |