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

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

Issue 13871009: Move signin_manager_fake.* to fake_signin_manager.* (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to TOT Created 7 years, 8 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_SIGNIN_SIGNIN_MANAGER_FAKE_H_
6 #define CHROME_BROWSER_SIGNIN_SIGNIN_MANAGER_FAKE_H_
7
8 #include <string>
9
10 #include "base/compiler_specific.h"
11 #include "chrome/browser/signin/signin_manager.h"
12
13 class Profile;
14 class ProfileKeyedService;
15
16 // A signin manager that bypasses actual authentication routines with servers
17 // and accepts the credentials provided to StartSignIn.
18 class FakeSigninManager : public SigninManager {
19 public:
20 explicit FakeSigninManager(Profile* profile);
21 virtual ~FakeSigninManager();
22
23 virtual void StartSignIn(const std::string& username,
24 const std::string& password,
25 const std::string& login_token,
26 const std::string& login_captcha) OVERRIDE;
27 virtual void StartSignInWithCredentials(const std::string& session_index,
28 const std::string& username,
29 const std::string& password) OVERRIDE;
30 virtual void StartSignInWithOAuth(const std::string& username,
31 const std::string& password) OVERRIDE;
32 virtual void SignOut() OVERRIDE;
33
34 // Helper function to force a signout.
35 virtual void ForceSignOut();
36
37 virtual bool AuthInProgress() const OVERRIDE;
38 void set_auth_in_progress(bool in_progress) {
39 auth_in_progress_ = in_progress;
40 }
41
42 // Helper function to be used with ProfileKeyedService::SetTestingFactory().
43 static ProfileKeyedService* Build(Profile* profile);
44
45 private:
46 bool auth_in_progress_;
47 };
48
49 #endif // CHROME_BROWSER_SIGNIN_SIGNIN_MANAGER_FAKE_H_
OLDNEW
« no previous file with comments | « chrome/browser/signin/signin_global_error_unittest.cc ('k') | chrome/browser/signin/signin_manager_fake.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698