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

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

Issue 338993007: Track when and how a profile is signed out via UMA. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: SignOut() param in Android tests Created 6 years, 5 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 #ifndef CHROME_BROWSER_SIGNIN_FAKE_SIGNIN_MANAGER_H_ 5 #ifndef CHROME_BROWSER_SIGNIN_FAKE_SIGNIN_MANAGER_H_
6 #define CHROME_BROWSER_SIGNIN_FAKE_SIGNIN_MANAGER_H_ 6 #define CHROME_BROWSER_SIGNIN_FAKE_SIGNIN_MANAGER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
11 #include "components/signin/core/browser/signin_manager.h" 11 #include "components/signin/core/browser/signin_manager.h"
12 #include "components/signin/core/browser/signin_metrics.h"
12 13
13 namespace content { 14 namespace content {
14 class BrowserContext; 15 class BrowserContext;
15 } 16 }
16 17
17 class Profile; 18 class Profile;
18 19
19 // SigninManager to use for testing. Tests should use the type 20 // SigninManager to use for testing. Tests should use the type
20 // SigninManagerForTesting to ensure that the right type for their platform is 21 // SigninManagerForTesting to ensure that the right type for their platform is
21 // used. 22 // used.
(...skipping 30 matching lines...) Expand all
52 void SignIn(const std::string& username, const std::string& password); 53 void SignIn(const std::string& username, const std::string& password);
53 54
54 void FailSignin(const GoogleServiceAuthError& error); 55 void FailSignin(const GoogleServiceAuthError& error);
55 56
56 virtual void StartSignInWithRefreshToken( 57 virtual void StartSignInWithRefreshToken(
57 const std::string& refresh_token, 58 const std::string& refresh_token,
58 const std::string& username, 59 const std::string& username,
59 const std::string& password, 60 const std::string& password,
60 const OAuthTokenFetchedCallback& oauth_fetched_callback) OVERRIDE; 61 const OAuthTokenFetchedCallback& oauth_fetched_callback) OVERRIDE;
61 62
62 virtual void SignOut() OVERRIDE; 63 virtual void SignOut(signin_metrics::ProfileSignout signout_source_metric)
64 OVERRIDE;
63 65
64 virtual void CompletePendingSignin() OVERRIDE; 66 virtual void CompletePendingSignin() OVERRIDE;
65 67
66 virtual void AddMergeSessionObserver( 68 virtual void AddMergeSessionObserver(
67 MergeSessionHelper::Observer* observer) OVERRIDE; 69 MergeSessionHelper::Observer* observer) OVERRIDE;
68 virtual void RemoveMergeSessionObserver( 70 virtual void RemoveMergeSessionObserver(
69 MergeSessionHelper::Observer* observer) OVERRIDE; 71 MergeSessionHelper::Observer* observer) OVERRIDE;
70 72
71 void NotifyMergeSessionObservers(const GoogleServiceAuthError& error); 73 void NotifyMergeSessionObservers(const GoogleServiceAuthError& error);
72 74
73 private: 75 private:
74 ObserverList<MergeSessionHelper::Observer, true> merge_session_observer_list_; 76 ObserverList<MergeSessionHelper::Observer, true> merge_session_observer_list_;
75 }; 77 };
76 78
77 #endif // !defined (OS_CHROMEOS) 79 #endif // !defined (OS_CHROMEOS)
78 80
79 #if defined(OS_CHROMEOS) 81 #if defined(OS_CHROMEOS)
80 typedef FakeSigninManagerBase FakeSigninManagerForTesting; 82 typedef FakeSigninManagerBase FakeSigninManagerForTesting;
81 #else 83 #else
82 typedef FakeSigninManager FakeSigninManagerForTesting; 84 typedef FakeSigninManager FakeSigninManagerForTesting;
83 #endif 85 #endif
84 86
85 #endif // CHROME_BROWSER_SIGNIN_FAKE_SIGNIN_MANAGER_H_ 87 #endif // CHROME_BROWSER_SIGNIN_FAKE_SIGNIN_MANAGER_H_
OLDNEW
« no previous file with comments | « chrome/browser/signin/account_reconcilor_unittest.cc ('k') | chrome/browser/signin/fake_signin_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698