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

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

Issue 192313002: Make ChromeSigninClient a BrowserContextKeyedService (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Nit Created 6 years, 9 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/chrome_notification_types.h" 9 #include "chrome/browser/chrome_notification_types.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
11 #include "chrome/browser/signin/chrome_signin_client.h" 11 #include "chrome/browser/signin/chrome_signin_client_factory.h"
12 #include "chrome/browser/signin/signin_global_error.h" 12 #include "chrome/browser/signin/signin_global_error.h"
13 #include "chrome/browser/signin/signin_manager_factory.h" 13 #include "chrome/browser/signin/signin_manager_factory.h"
14 #include "chrome/browser/ui/global_error/global_error_service.h" 14 #include "chrome/browser/ui/global_error/global_error_service.h"
15 #include "chrome/browser/ui/global_error/global_error_service_factory.h" 15 #include "chrome/browser/ui/global_error/global_error_service_factory.h"
16 #include "chrome/common/pref_names.h" 16 #include "chrome/common/pref_names.h"
17 #include "content/public/browser/notification_service.h" 17 #include "content/public/browser/notification_service.h"
18 18
19 FakeSigninManagerBase::FakeSigninManagerBase() { 19 FakeSigninManagerBase::FakeSigninManagerBase() {
20 } 20 }
21 21
(...skipping 12 matching lines...) Expand all
34 #endif 34 #endif
35 manager->Initialize(profile, NULL); 35 manager->Initialize(profile, NULL);
36 SigninManagerFactory::GetInstance() 36 SigninManagerFactory::GetInstance()
37 ->NotifyObserversOfSigninManagerCreationForTesting(manager); 37 ->NotifyObserversOfSigninManagerCreationForTesting(manager);
38 return manager; 38 return manager;
39 } 39 }
40 40
41 #if !defined (OS_CHROMEOS) 41 #if !defined (OS_CHROMEOS)
42 42
43 FakeSigninManager::FakeSigninManager(Profile* profile) 43 FakeSigninManager::FakeSigninManager(Profile* profile)
44 : SigninManager(scoped_ptr<SigninClient>(new ChromeSigninClient(profile))) { 44 : SigninManager(
45 } 45 ChromeSigninClientFactory::GetInstance()->GetForProfile(profile)) {}
46 46
47 FakeSigninManager::~FakeSigninManager() { 47 FakeSigninManager::~FakeSigninManager() {
48 } 48 }
49 49
50 void FakeSigninManager::StartSignInWithCredentials( 50 void FakeSigninManager::StartSignInWithCredentials(
51 const std::string& session_index, 51 const std::string& session_index,
52 const std::string& username, 52 const std::string& username,
53 const std::string& password, 53 const std::string& password,
54 const OAuthTokenFetchedCallback& oauth_fetched_callback) { 54 const OAuthTokenFetchedCallback& oauth_fetched_callback) {
55 set_auth_in_progress(username); 55 set_auth_in_progress(username);
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 content::NotificationService::current()->Notify( 91 content::NotificationService::current()->Notify(
92 chrome::NOTIFICATION_GOOGLE_SIGNED_OUT, 92 chrome::NOTIFICATION_GOOGLE_SIGNED_OUT,
93 content::Source<Profile>(profile_), 93 content::Source<Profile>(profile_),
94 content::Details<const GoogleServiceSignoutDetails>(&details)); 94 content::Details<const GoogleServiceSignoutDetails>(&details));
95 95
96 FOR_EACH_OBSERVER(SigninManagerBase::Observer, observer_list_, 96 FOR_EACH_OBSERVER(SigninManagerBase::Observer, observer_list_,
97 GoogleSignedOut(username)); 97 GoogleSignedOut(username));
98 } 98 }
99 99
100 #endif // !defined (OS_CHROMEOS) 100 #endif // !defined (OS_CHROMEOS)
OLDNEW
« no previous file with comments | « chrome/browser/signin/chrome_signin_client_factory.cc ('k') | chrome/browser/signin/signin_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698