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

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

Issue 6089004: [Chrome OS] Respect periods in google apps account names (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address avayvod comments Created 9 years, 11 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/authenticator.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_AUTHENTICATOR_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_AUTHENTICATOR_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_AUTHENTICATOR_H_ 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_AUTHENTICATOR_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/ref_counted.h" 10 #include "base/ref_counted.h"
11 #include "chrome/browser/chromeos/login/login_status_consumer.h" 11 #include "chrome/browser/chromeos/login/login_status_consumer.h"
12 #include "chrome/common/net/gaia/gaia_auth_consumer.h" 12 #include "chrome/common/net/gaia/gaia_auth_consumer.h"
13 13
14 class Profile; 14 class Profile;
15 15
16 namespace chromeos { 16 namespace chromeos {
17 17
18 // An interface for objects that will authenticate a Chromium OS user. 18 // An interface for objects that will authenticate a Chromium OS user.
19 // When authentication successfully completes, will call 19 // When authentication successfully completes, will call
20 // consumer_->OnLoginSuccess() on the UI thread. 20 // consumer_->OnLoginSuccess() on the UI thread.
21 // On failure, will call consumer_->OnLoginFailure() on the UI thread. 21 // On failure, will call consumer_->OnLoginFailure() on the UI thread.
22 // On password change detected, will call 22 // On password change detected, will call
23 // consumer_->OnPasswordChangeDetected() on the UI thread. 23 // consumer_->OnPasswordChangeDetected() on the UI thread.
24 class Authenticator : public base::RefCountedThreadSafe<Authenticator> { 24 class Authenticator : public base::RefCountedThreadSafe<Authenticator> {
25 public: 25 public:
26 // A domain which requires special-case parsing in canonicalization.
27 static const char kSpecialCaseDomain[];
28
26 explicit Authenticator(LoginStatusConsumer* consumer); 29 explicit Authenticator(LoginStatusConsumer* consumer);
27 virtual ~Authenticator(); 30 virtual ~Authenticator();
28 31
29 // Given a |username| and |password|, this method attempts to authenticate 32 // Given a |username| and |password|, this method attempts to authenticate
30 // to login. 33 // to login.
31 // Optionally |login_token| and |login_captcha| could be provided. 34 // Optionally |login_token| and |login_captcha| could be provided.
32 // Returns true if we kick off the attempt successfully and false if we can't. 35 // Returns true if we kick off the attempt successfully and false if we can't.
33 // Must be called on the UI thread. 36 // Must be called on the UI thread.
34 virtual bool AuthenticateToLogin(Profile* profile, 37 virtual bool AuthenticateToLogin(Profile* profile,
35 const std::string& username, 38 const std::string& username,
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 protected: 96 protected:
94 LoginStatusConsumer* consumer_; 97 LoginStatusConsumer* consumer_;
95 98
96 private: 99 private:
97 DISALLOW_COPY_AND_ASSIGN(Authenticator); 100 DISALLOW_COPY_AND_ASSIGN(Authenticator);
98 }; 101 };
99 102
100 } // namespace chromeos 103 } // namespace chromeos
101 104
102 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_AUTHENTICATOR_H_ 105 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_AUTHENTICATOR_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/authenticator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698