Chromium Code Reviews| 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 "base/prefs/pref_service.h" | 7 #include "base/prefs/pref_service.h" |
| 8 #include "chrome/browser/google/google_url_tracker_factory.h" | 8 #include "chrome/browser/google/google_url_tracker_factory.h" |
| 9 #include "chrome/browser/history/history_service_factory.h" | 9 #include "chrome/browser/history/history_service_factory.h" |
| 10 #include "chrome/browser/prefs/pref_registry_syncable.h" | 10 #include "chrome/browser/prefs/pref_registry_syncable.h" |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 86 prefs::kDefaultSearchProviderSearchTermsReplacementKey, | 86 prefs::kDefaultSearchProviderSearchTermsReplacementKey, |
| 87 std::string(), | 87 std::string(), |
| 88 PrefRegistrySyncable::UNSYNCABLE_PREF); | 88 PrefRegistrySyncable::UNSYNCABLE_PREF); |
| 89 } | 89 } |
| 90 | 90 |
| 91 bool TemplateURLServiceFactory::ServiceRedirectedInIncognito() const { | 91 bool TemplateURLServiceFactory::ServiceRedirectedInIncognito() const { |
| 92 return true; | 92 return true; |
| 93 } | 93 } |
| 94 | 94 |
| 95 bool TemplateURLServiceFactory::ServiceIsNULLWhileTesting() const { | 95 bool TemplateURLServiceFactory::ServiceIsNULLWhileTesting() const { |
| 96 return true; | 96 return false; |
|
sky
2013/02/12 22:29:11
I would be surprised if this doesn't effect a bunc
| |
| 97 } | 97 } |
| 98 | 98 |
| 99 void TemplateURLServiceFactory::ProfileShutdown(Profile* profile) { | 99 void TemplateURLServiceFactory::ProfileShutdown(Profile* profile) { |
| 100 // We shutdown AND destroy the TemplateURLService during this pass. | 100 // We shutdown AND destroy the TemplateURLService during this pass. |
| 101 // TemplateURLService schedules a task on the WebDataService from its | 101 // TemplateURLService schedules a task on the WebDataService from its |
| 102 // destructor. Delete it first to ensure the task gets scheduled before we | 102 // destructor. Delete it first to ensure the task gets scheduled before we |
| 103 // shut down the database. | 103 // shut down the database. |
| 104 ProfileKeyedServiceFactory::ProfileShutdown(profile); | 104 ProfileKeyedServiceFactory::ProfileShutdown(profile); |
| 105 ProfileKeyedServiceFactory::ProfileDestroyed(profile); | 105 ProfileKeyedServiceFactory::ProfileDestroyed(profile); |
| 106 } | 106 } |
| 107 | 107 |
| 108 void TemplateURLServiceFactory::ProfileDestroyed(Profile* profile) { | 108 void TemplateURLServiceFactory::ProfileDestroyed(Profile* profile) { |
| 109 // Don't double delete. | 109 // Don't double delete. |
| 110 } | 110 } |
| OLD | NEW |