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/profiles/incognito_helpers.h" | 10 #include "chrome/browser/profiles/incognito_helpers.h" |
(...skipping 29 matching lines...) Expand all Loading... |
40 DependsOn(WebDataServiceFactory::GetInstance()); | 40 DependsOn(WebDataServiceFactory::GetInstance()); |
41 } | 41 } |
42 | 42 |
43 TemplateURLServiceFactory::~TemplateURLServiceFactory() {} | 43 TemplateURLServiceFactory::~TemplateURLServiceFactory() {} |
44 | 44 |
45 BrowserContextKeyedService* TemplateURLServiceFactory::BuildServiceInstanceFor( | 45 BrowserContextKeyedService* TemplateURLServiceFactory::BuildServiceInstanceFor( |
46 content::BrowserContext* profile) const { | 46 content::BrowserContext* profile) const { |
47 return BuildInstanceFor(static_cast<Profile*>(profile)); | 47 return BuildInstanceFor(static_cast<Profile*>(profile)); |
48 } | 48 } |
49 | 49 |
50 void TemplateURLServiceFactory::RegisterUserPrefs( | 50 void TemplateURLServiceFactory::RegisterProfilePrefs( |
51 user_prefs::PrefRegistrySyncable* registry) { | 51 user_prefs::PrefRegistrySyncable* registry) { |
52 registry->RegisterStringPref(prefs::kSyncedDefaultSearchProviderGUID, | 52 registry->RegisterStringPref(prefs::kSyncedDefaultSearchProviderGUID, |
53 std::string(), | 53 std::string(), |
54 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); | 54 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); |
55 registry->RegisterBooleanPref( | 55 registry->RegisterBooleanPref( |
56 prefs::kDefaultSearchProviderEnabled, | 56 prefs::kDefaultSearchProviderEnabled, |
57 true, | 57 true, |
58 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | 58 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
59 registry->RegisterStringPref( | 59 registry->RegisterStringPref( |
60 prefs::kDefaultSearchProviderName, | 60 prefs::kDefaultSearchProviderName, |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 // destructor. Delete it first to ensure the task gets scheduled before we | 116 // destructor. Delete it first to ensure the task gets scheduled before we |
117 // shut down the database. | 117 // shut down the database. |
118 BrowserContextKeyedServiceFactory::BrowserContextShutdown(profile); | 118 BrowserContextKeyedServiceFactory::BrowserContextShutdown(profile); |
119 BrowserContextKeyedServiceFactory::BrowserContextDestroyed(profile); | 119 BrowserContextKeyedServiceFactory::BrowserContextDestroyed(profile); |
120 } | 120 } |
121 | 121 |
122 void TemplateURLServiceFactory::BrowserContextDestroyed( | 122 void TemplateURLServiceFactory::BrowserContextDestroyed( |
123 content::BrowserContext* profile) { | 123 content::BrowserContext* profile) { |
124 // Don't double delete. | 124 // Don't double delete. |
125 } | 125 } |
OLD | NEW |