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

Side by Side Diff: chrome/browser/chromeos/login/auth/test_attempt_state.h

Issue 290483003: Tame the proliferation of UserContext constructors (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 6 years, 7 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_AUTH_TEST_ATTEMPT_STATE_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_AUTH_TEST_ATTEMPT_STATE_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_AUTH_TEST_ATTEMPT_STATE_H_ 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_AUTH_TEST_ATTEMPT_STATE_H_
7 7
8 #include <string>
9
10 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
11 #include "chrome/browser/chromeos/login/auth/auth_attempt_state.h" 9 #include "chrome/browser/chromeos/login/auth/auth_attempt_state.h"
12 #include "chrome/browser/chromeos/login/auth/login_status_consumer.h" 10 #include "chrome/browser/chromeos/login/auth/login_status_consumer.h"
13 #include "chrome/browser/chromeos/login/users/user.h"
14 #include "google_apis/gaia/gaia_auth_consumer.h" 11 #include "google_apis/gaia/gaia_auth_consumer.h"
15 12
16 namespace chromeos { 13 namespace chromeos {
17 14
15 class UserContext;
16
18 class TestAttemptState : public AuthAttemptState { 17 class TestAttemptState : public AuthAttemptState {
19 public: 18 public:
20 TestAttemptState(const UserContext& credentials, 19 TestAttemptState(const UserContext& credentials, const bool user_is_new);
21 const std::string& login_token,
22 const std::string& login_captcha,
23 const User::UserType user_type,
24 const bool user_is_new);
25 20
26 virtual ~TestAttemptState(); 21 virtual ~TestAttemptState();
27 22
28 // Act as though an online login attempt completed already. 23 // Act as though an online login attempt completed already.
29 void PresetOnlineLoginStatus( 24 void PresetOnlineLoginStatus(
30 const LoginFailure& outcome); 25 const LoginFailure& outcome);
31 26
32 // The next attempt will not allow HOSTED accounts to log in. 27 // The next attempt will not allow HOSTED accounts to log in.
33 void DisableHosted(); 28 void DisableHosted();
34 29
(...skipping 10 matching lines...) Expand all
45 virtual bool cryptohome_outcome() OVERRIDE; 40 virtual bool cryptohome_outcome() OVERRIDE;
46 virtual cryptohome::MountError cryptohome_code() OVERRIDE; 41 virtual cryptohome::MountError cryptohome_code() OVERRIDE;
47 42
48 private: 43 private:
49 DISALLOW_COPY_AND_ASSIGN(TestAttemptState); 44 DISALLOW_COPY_AND_ASSIGN(TestAttemptState);
50 }; 45 };
51 46
52 } // namespace chromeos 47 } // namespace chromeos
53 48
54 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_AUTH_TEST_ATTEMPT_STATE_H_ 49 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_AUTH_TEST_ATTEMPT_STATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698