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

Side by Side Diff: chrome/browser/ui/webui/signin/login_ui_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/ui/webui/signin/login_ui_service_factory.h" 5 #include "chrome/browser/ui/webui/signin/login_ui_service_factory.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/prefs/pref_service.h" 9 #include "base/prefs/pref_service.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
(...skipping 10 matching lines...) Expand all
21 LoginUIServiceFactory::~LoginUIServiceFactory() {} 21 LoginUIServiceFactory::~LoginUIServiceFactory() {}
22 22
23 // static 23 // static
24 LoginUIService* LoginUIServiceFactory::GetForProfile(Profile* profile) { 24 LoginUIService* LoginUIServiceFactory::GetForProfile(Profile* profile) {
25 return static_cast<LoginUIService*>( 25 return static_cast<LoginUIService*>(
26 GetInstance()->GetServiceForBrowserContext(profile, true)); 26 GetInstance()->GetServiceForBrowserContext(profile, true));
27 } 27 }
28 28
29 // static 29 // static
30 LoginUIServiceFactory* LoginUIServiceFactory::GetInstance() { 30 LoginUIServiceFactory* LoginUIServiceFactory::GetInstance() {
31 return Singleton<LoginUIServiceFactory>::get(); 31 return base::Singleton<LoginUIServiceFactory>::get();
32 } 32 }
33 33
34 // static 34 // static
35 base::Closure LoginUIServiceFactory::GetShowLoginPopupCallbackForProfile( 35 base::Closure LoginUIServiceFactory::GetShowLoginPopupCallbackForProfile(
36 Profile* profile) { 36 Profile* profile) {
37 return base::Bind( 37 return base::Bind(
38 &LoginUIService::ShowLoginPopup, 38 &LoginUIService::ShowLoginPopup,
39 base::Unretained(LoginUIServiceFactory::GetForProfile(profile))); 39 base::Unretained(LoginUIServiceFactory::GetForProfile(profile)));
40 } 40 }
41 41
42 KeyedService* LoginUIServiceFactory::BuildServiceInstanceFor( 42 KeyedService* LoginUIServiceFactory::BuildServiceInstanceFor(
43 content::BrowserContext* profile) const { 43 content::BrowserContext* profile) const {
44 return new LoginUIService(static_cast<Profile*>(profile)); 44 return new LoginUIService(static_cast<Profile*>(profile));
45 } 45 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/signin/login_ui_service_factory.h ('k') | chrome/browser/undo/bookmark_undo_service_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698