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

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

Issue 14715010: Formatting fix. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 7 months 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
OLDNEW
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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 registry->RegisterListPref(prefs::kDefaultSearchProviderAlternateURLs, 84 registry->RegisterListPref(prefs::kDefaultSearchProviderAlternateURLs,
85 PrefRegistrySyncable::UNSYNCABLE_PREF); 85 PrefRegistrySyncable::UNSYNCABLE_PREF);
86 registry->RegisterStringPref( 86 registry->RegisterStringPref(
87 prefs::kDefaultSearchProviderSearchTermsReplacementKey, 87 prefs::kDefaultSearchProviderSearchTermsReplacementKey,
88 std::string(), 88 std::string(),
89 PrefRegistrySyncable::UNSYNCABLE_PREF); 89 PrefRegistrySyncable::UNSYNCABLE_PREF);
90 } 90 }
91 91
92 content::BrowserContext* TemplateURLServiceFactory::GetBrowserContextToUse( 92 content::BrowserContext* TemplateURLServiceFactory::GetBrowserContextToUse(
93 content::BrowserContext* context) const { 93 content::BrowserContext* context) const {
94 return chrome::GetBrowserContextRedirectedInIncognito(context); 94 return chrome::GetBrowserContextOwnInstanceInIncognito(context);
95 } 95 }
96 96
97 bool TemplateURLServiceFactory::ServiceIsNULLWhileTesting() const { 97 bool TemplateURLServiceFactory::ServiceIsNULLWhileTesting() const {
98 return true; 98 return true;
99 } 99 }
100 100
101 void TemplateURLServiceFactory::ProfileShutdown( 101 void TemplateURLServiceFactory::ProfileShutdown(
102 content::BrowserContext* profile) { 102 content::BrowserContext* profile) {
103 // We shutdown AND destroy the TemplateURLService during this pass. 103 // We shutdown AND destroy the TemplateURLService during this pass.
104 // TemplateURLService schedules a task on the WebDataService from its 104 // TemplateURLService schedules a task on the WebDataService from its
105 // destructor. Delete it first to ensure the task gets scheduled before we 105 // destructor. Delete it first to ensure the task gets scheduled before we
106 // shut down the database. 106 // shut down the database.
107 ProfileKeyedServiceFactory::ProfileShutdown(profile); 107 ProfileKeyedServiceFactory::ProfileShutdown(profile);
108 ProfileKeyedServiceFactory::ProfileDestroyed(profile); 108 ProfileKeyedServiceFactory::ProfileDestroyed(profile);
109 } 109 }
110 110
111 void TemplateURLServiceFactory::ProfileDestroyed( 111 void TemplateURLServiceFactory::ProfileDestroyed(
112 content::BrowserContext* profile) { 112 content::BrowserContext* profile) {
113 // Don't double delete. 113 // Don't double delete.
114 } 114 }
OLDNEW
« no previous file with comments | « chrome/browser/search_engines/search_terms_data.cc ('k') | chrome/browser/ui/gtk/omnibox/omnibox_view_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698