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

Side by Side Diff: chrome/browser/signin/fake_signin_manager.cc

Issue 14141006: [components] Switch {RefCounted}ProfileKeyedService to use BrowserContext (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: for review Created 7 years, 8 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 | Annotate | Revision Log
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/signin/fake_signin_manager.h" 5 #include "chrome/browser/signin/fake_signin_manager.h"
6 6
7 #include "base/callback_helpers.h" 7 #include "base/callback_helpers.h"
8 #include "base/prefs/pref_service.h" 8 #include "base/prefs/pref_service.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/signin/signin_global_error.h" 10 #include "chrome/browser/signin/signin_global_error.h"
(...skipping 23 matching lines...) Expand all
34 34
35 void FakeSigninManagerBase::SignOut() { 35 void FakeSigninManagerBase::SignOut() {
36 authenticated_username_.clear(); 36 authenticated_username_.clear();
37 content::NotificationService::current()->Notify( 37 content::NotificationService::current()->Notify(
38 chrome::NOTIFICATION_GOOGLE_SIGNED_OUT, 38 chrome::NOTIFICATION_GOOGLE_SIGNED_OUT,
39 content::Source<Profile>(profile_), 39 content::Source<Profile>(profile_),
40 content::NotificationService::NoDetails()); 40 content::NotificationService::NoDetails());
41 } 41 }
42 42
43 // static 43 // static
44 ProfileKeyedService* FakeSigninManagerBase::Build(Profile* profile) { 44 ProfileKeyedService* FakeSigninManagerBase::Build(
45 return new FakeSigninManagerBase(profile); 45 content::BrowserContext* profile) {
46 return new FakeSigninManagerBase(static_cast<Profile*>(profile));
46 } 47 }
47 48
48 #if !defined (OS_CHROMEOS) 49 #if !defined (OS_CHROMEOS)
49 50
50 FakeSigninManager::FakeSigninManager(Profile* profile) { 51 FakeSigninManager::FakeSigninManager(Profile* profile) {
51 Initialize(profile); 52 Initialize(profile);
52 } 53 }
53 54
54 FakeSigninManager::~FakeSigninManager() { 55 FakeSigninManager::~FakeSigninManager() {
55 } 56 }
(...skipping 24 matching lines...) Expand all
80 if (IsSignoutProhibited()) 81 if (IsSignoutProhibited())
81 return; 82 return;
82 authenticated_username_.clear(); 83 authenticated_username_.clear();
83 content::NotificationService::current()->Notify( 84 content::NotificationService::current()->Notify(
84 chrome::NOTIFICATION_GOOGLE_SIGNED_OUT, 85 chrome::NOTIFICATION_GOOGLE_SIGNED_OUT,
85 content::Source<Profile>(profile_), 86 content::Source<Profile>(profile_),
86 content::NotificationService::NoDetails()); 87 content::NotificationService::NoDetails());
87 } 88 }
88 89
89 // static 90 // static
90 ProfileKeyedService* FakeSigninManager::Build(Profile* profile) { 91 ProfileKeyedService* FakeSigninManager::Build(
91 return new FakeSigninManager(profile); 92 content::BrowserContext* profile) {
93 return new FakeSigninManager(static_cast<Profile*>(profile));
92 } 94 }
93 95
94 #endif // !defined (OS_CHROMEOS) 96 #endif // !defined (OS_CHROMEOS)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698