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

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

Issue 1308823002: Move Singleton and related structs to namespace base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ToT Created 5 years, 3 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 <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/prefs/pref_service.h" 10 #include "base/prefs/pref_service.h"
(...skipping 16 matching lines...) Expand all
27 #endif 27 #endif
28 28
29 // static 29 // static
30 TemplateURLService* TemplateURLServiceFactory::GetForProfile(Profile* profile) { 30 TemplateURLService* TemplateURLServiceFactory::GetForProfile(Profile* profile) {
31 return static_cast<TemplateURLService*>( 31 return static_cast<TemplateURLService*>(
32 GetInstance()->GetServiceForBrowserContext(profile, true)); 32 GetInstance()->GetServiceForBrowserContext(profile, true));
33 } 33 }
34 34
35 // static 35 // static
36 TemplateURLServiceFactory* TemplateURLServiceFactory::GetInstance() { 36 TemplateURLServiceFactory* TemplateURLServiceFactory::GetInstance() {
37 return Singleton<TemplateURLServiceFactory>::get(); 37 return base::Singleton<TemplateURLServiceFactory>::get();
38 } 38 }
39 39
40 // static 40 // static
41 scoped_ptr<KeyedService> TemplateURLServiceFactory::BuildInstanceFor( 41 scoped_ptr<KeyedService> TemplateURLServiceFactory::BuildInstanceFor(
42 content::BrowserContext* context) { 42 content::BrowserContext* context) {
43 base::Closure dsp_change_callback; 43 base::Closure dsp_change_callback;
44 #if defined(ENABLE_RLZ) 44 #if defined(ENABLE_RLZ)
45 dsp_change_callback = base::Bind( 45 dsp_change_callback = base::Bind(
46 base::IgnoreResult(&rlz::RLZTracker::RecordProductEvent), rlz_lib::CHROME, 46 base::IgnoreResult(&rlz::RLZTracker::RecordProductEvent), rlz_lib::CHROME,
47 rlz::RLZTracker::ChromeOmnibox(), rlz_lib::SET_TO_GOOGLE); 47 rlz::RLZTracker::ChromeOmnibox(), rlz_lib::SET_TO_GOOGLE);
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 } 82 }
83 83
84 content::BrowserContext* TemplateURLServiceFactory::GetBrowserContextToUse( 84 content::BrowserContext* TemplateURLServiceFactory::GetBrowserContextToUse(
85 content::BrowserContext* context) const { 85 content::BrowserContext* context) const {
86 return chrome::GetBrowserContextRedirectedInIncognito(context); 86 return chrome::GetBrowserContextRedirectedInIncognito(context);
87 } 87 }
88 88
89 bool TemplateURLServiceFactory::ServiceIsNULLWhileTesting() const { 89 bool TemplateURLServiceFactory::ServiceIsNULLWhileTesting() const {
90 return true; 90 return true;
91 } 91 }
OLDNEW
« no previous file with comments | « chrome/browser/search_engines/template_url_service_factory.h ('k') | chrome/browser/service_process/service_process_control.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698