Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1079)

Side by Side Diff: chrome/browser/search_engines/template_url_service_factory.cc

Issue 8334030: Merge search engines sync data type with Preferences. Sync the default search provider. Add some ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Merge to TOT and fixed additional conflicts from rsimha. Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/prefs/pref_service.h" 7 #include "chrome/browser/prefs/pref_service.h"
8 #include "chrome/browser/profiles/profile_dependency_manager.h" 8 #include "chrome/browser/profiles/profile_dependency_manager.h"
9 #include "chrome/browser/search_engines/template_url_service.h" 9 #include "chrome/browser/search_engines/template_url_service.h"
10 #include "chrome/common/pref_names.h" 10 #include "chrome/common/pref_names.h"
(...skipping 17 matching lines...) Expand all
28 } 28 }
29 29
30 TemplateURLServiceFactory::~TemplateURLServiceFactory() {} 30 TemplateURLServiceFactory::~TemplateURLServiceFactory() {}
31 31
32 ProfileKeyedService* TemplateURLServiceFactory::BuildServiceInstanceFor( 32 ProfileKeyedService* TemplateURLServiceFactory::BuildServiceInstanceFor(
33 Profile* profile) const { 33 Profile* profile) const {
34 return new TemplateURLService(profile); 34 return new TemplateURLService(profile);
35 } 35 }
36 36
37 void TemplateURLServiceFactory::RegisterUserPrefs(PrefService* prefs) { 37 void TemplateURLServiceFactory::RegisterUserPrefs(PrefService* prefs) {
38 prefs->RegisterStringPref(prefs::kSyncedDefaultSearchProviderGUID,
39 std::string(),
40 PrefService::SYNCABLE_PREF);
38 prefs->RegisterBooleanPref(prefs::kDefaultSearchProviderEnabled, 41 prefs->RegisterBooleanPref(prefs::kDefaultSearchProviderEnabled,
39 true, 42 true,
40 PrefService::UNSYNCABLE_PREF); 43 PrefService::UNSYNCABLE_PREF);
41 prefs->RegisterStringPref(prefs::kDefaultSearchProviderName, 44 prefs->RegisterStringPref(prefs::kDefaultSearchProviderName,
42 std::string(), 45 std::string(),
43 PrefService::UNSYNCABLE_PREF); 46 PrefService::UNSYNCABLE_PREF);
44 prefs->RegisterStringPref(prefs::kDefaultSearchProviderID, 47 prefs->RegisterStringPref(prefs::kDefaultSearchProviderID,
45 std::string(), 48 std::string(),
46 PrefService::UNSYNCABLE_PREF); 49 PrefService::UNSYNCABLE_PREF);
47 prefs->RegisterStringPref(prefs::kDefaultSearchProviderPrepopulateID, 50 prefs->RegisterStringPref(prefs::kDefaultSearchProviderPrepopulateID,
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 // TemplateURLService schedules a task on the WebDataService from its 83 // TemplateURLService schedules a task on the WebDataService from its
81 // destructor. Delete it first to ensure the task gets scheduled before we 84 // destructor. Delete it first to ensure the task gets scheduled before we
82 // shut down the database. 85 // shut down the database.
83 ProfileKeyedServiceFactory::ProfileShutdown(profile); 86 ProfileKeyedServiceFactory::ProfileShutdown(profile);
84 ProfileKeyedServiceFactory::ProfileDestroyed(profile); 87 ProfileKeyedServiceFactory::ProfileDestroyed(profile);
85 } 88 }
86 89
87 void TemplateURLServiceFactory::ProfileDestroyed(Profile* profile) { 90 void TemplateURLServiceFactory::ProfileDestroyed(Profile* profile) {
88 // Don't double delete. 91 // Don't double delete.
89 } 92 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698