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

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

Issue 192253002: Rename SigninManagerDelegate to SigninClient (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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_manager_delegate.h" 11 #include "chrome/browser/signin/chrome_signin_client.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<SigninManagerDelegate>( 44 : SigninManager(scoped_ptr<SigninClient>(new ChromeSigninClient(profile))) {
45 new ChromeSigninManagerDelegate(profile))) {
46 } 45 }
47 46
48 FakeSigninManager::~FakeSigninManager() { 47 FakeSigninManager::~FakeSigninManager() {
49 } 48 }
50 49
51 void FakeSigninManager::StartSignInWithCredentials( 50 void FakeSigninManager::StartSignInWithCredentials(
52 const std::string& session_index, 51 const std::string& session_index,
53 const std::string& username, 52 const std::string& username,
54 const std::string& password, 53 const std::string& password,
55 const OAuthTokenFetchedCallback& oauth_fetched_callback) { 54 const OAuthTokenFetchedCallback& oauth_fetched_callback) {
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 content::NotificationService::current()->Notify( 91 content::NotificationService::current()->Notify(
93 chrome::NOTIFICATION_GOOGLE_SIGNED_OUT, 92 chrome::NOTIFICATION_GOOGLE_SIGNED_OUT,
94 content::Source<Profile>(profile_), 93 content::Source<Profile>(profile_),
95 content::Details<const GoogleServiceSignoutDetails>(&details)); 94 content::Details<const GoogleServiceSignoutDetails>(&details));
96 95
97 FOR_EACH_OBSERVER(SigninManagerBase::Observer, observer_list_, 96 FOR_EACH_OBSERVER(SigninManagerBase::Observer, observer_list_,
98 GoogleSignedOut(username)); 97 GoogleSignedOut(username));
99 } 98 }
100 99
101 #endif // !defined (OS_CHROMEOS) 100 #endif // !defined (OS_CHROMEOS)
OLDNEW
« no previous file with comments | « chrome/browser/signin/chrome_signin_manager_delegate.cc ('k') | chrome/browser/signin/signin_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698