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

Side by Side Diff: chrome/browser/chromeos/login/login_status_consumer.h

Issue 4980005: Allow sync with 2-factor StrongAuth accounts in ChromeOS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 10 years, 1 month 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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_CHROMEOS_LOGIN_LOGIN_STATUS_CONSUMER_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_LOGIN_STATUS_CONSUMER_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_LOGIN_STATUS_CONSUMER_H_ 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_LOGIN_STATUS_CONSUMER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 #include "chrome/common/net/gaia/gaia_auth_consumer.h" 10 #include "chrome/common/net/gaia/gaia_auth_consumer.h"
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 FailureReason reason_; 88 FailureReason reason_;
89 GoogleServiceAuthError error_; 89 GoogleServiceAuthError error_;
90 }; 90 };
91 91
92 // An interface that defines the callbacks for objects that the 92 // An interface that defines the callbacks for objects that the
93 // Authenticator class will call to report the success/failure of 93 // Authenticator class will call to report the success/failure of
94 // authentication for Chromium OS. 94 // authentication for Chromium OS.
95 class LoginStatusConsumer { 95 class LoginStatusConsumer {
96 public: 96 public:
97 virtual ~LoginStatusConsumer() {} 97 virtual ~LoginStatusConsumer() {}
98 // Called when there was a failure during login, but the attempt may not fail
99 // (e.g. TWO_FACTOR failure). This should set any appropriate flags for
100 // consumption in OnLoginSuccess or OnLoginFailure.
101 virtual void SetLoginFailure(const LoginFailure& error) = 0;
Chris Masone 2010/11/17 01:11:09 This mechanism is kind of ugly. Why not just crea
stevenjb 2010/11/17 23:48:41 I agree that it was an awkward solution. I failed
98 // The current login attempt has ended in failure, with error |error|. 102 // The current login attempt has ended in failure, with error |error|.
99 virtual void OnLoginFailure(const LoginFailure& error) = 0; 103 virtual void OnLoginFailure(const LoginFailure& error) = 0;
100 // The current login attempt has succeeded for 104 // The current login attempt has succeeded for
101 // |username|/|password|, returning |credentials|. If 105 // |username|/|password|, returning |credentials|. If
102 // |pending_requests| is false, we're totally done. If it's true, 106 // |pending_requests| is false, we're totally done. If it's true,
103 // we will still have some more results to report later. 107 // we will still have some more results to report later.
104 virtual void OnLoginSuccess( 108 virtual void OnLoginSuccess(
105 const std::string& username, 109 const std::string& username,
106 const std::string& password, 110 const std::string& password,
107 const GaiaAuthConsumer::ClientLoginResult& credentials, 111 const GaiaAuthConsumer::ClientLoginResult& credentials,
108 bool pending_requests) = 0; 112 bool pending_requests) = 0;
109 // The current guest login attempt has succeeded. 113 // The current guest login attempt has succeeded.
110 virtual void OnOffTheRecordLoginSuccess() {} 114 virtual void OnOffTheRecordLoginSuccess() {}
111 // The same password didn't work both online and offline. 115 // The same password didn't work both online and offline.
112 virtual void OnPasswordChangeDetected( 116 virtual void OnPasswordChangeDetected(
113 const GaiaAuthConsumer::ClientLoginResult& credentials) { 117 const GaiaAuthConsumer::ClientLoginResult& credentials) {
114 NOTREACHED(); 118 NOTREACHED();
115 }; 119 };
116 }; 120 };
117 121
118 } // namespace chromeos 122 } // namespace chromeos
119 123
120 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_LOGIN_STATUS_CONSUMER_H_ 124 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_LOGIN_STATUS_CONSUMER_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/login_screen.h ('k') | chrome/browser/chromeos/login/mock_login_status_consumer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698