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

Side by Side Diff: chrome/browser/chromeos/login/fake_login_utils.cc

Issue 296773002: Add a Key class (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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #include "chrome/browser/chromeos/login/fake_login_utils.h" 5 #include "chrome/browser/chromeos/login/fake_login_utils.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/prefs/pref_service.h" 8 #include "base/prefs/pref_service.h"
9 #include "chrome/browser/chrome_notification_types.h" 9 #include "chrome/browser/chrome_notification_types.h"
10 #include "chrome/browser/chromeos/login/auth/mock_authenticator.h" 10 #include "chrome/browser/chromeos/login/auth/mock_authenticator.h"
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 void FakeLoginUtils::CompleteOffTheRecordLogin(const GURL& start_url) { 94 void FakeLoginUtils::CompleteOffTheRecordLogin(const GURL& start_url) {
95 NOTREACHED() << "Method not implemented."; 95 NOTREACHED() << "Method not implemented.";
96 } 96 }
97 97
98 void FakeLoginUtils::SetFirstLoginPrefs(PrefService* prefs) { 98 void FakeLoginUtils::SetFirstLoginPrefs(PrefService* prefs) {
99 NOTREACHED() << "Method not implemented."; 99 NOTREACHED() << "Method not implemented.";
100 } 100 }
101 101
102 scoped_refptr<Authenticator> FakeLoginUtils::CreateAuthenticator( 102 scoped_refptr<Authenticator> FakeLoginUtils::CreateAuthenticator(
103 LoginStatusConsumer* consumer) { 103 LoginStatusConsumer* consumer) {
104 authenticator_ = 104 authenticator_ = new MockAuthenticator(consumer, expected_user_context_);
105 new MockAuthenticator(consumer, expected_username_, expected_password_);
106 return authenticator_; 105 return authenticator_;
107 } 106 }
108 107
109 void FakeLoginUtils::RestoreAuthenticationSession(Profile* profile) { 108 void FakeLoginUtils::RestoreAuthenticationSession(Profile* profile) {
110 NOTREACHED() << "Method not implemented."; 109 NOTREACHED() << "Method not implemented.";
111 } 110 }
112 111
113 void FakeLoginUtils::InitRlzDelayed(Profile* user_profile) { 112 void FakeLoginUtils::InitRlzDelayed(Profile* user_profile) {
114 NOTREACHED() << "Method not implemented."; 113 NOTREACHED() << "Method not implemented.";
115 } 114 }
116 115
117 void FakeLoginUtils::SetExpectedCredentials(const std::string& username, 116 void FakeLoginUtils::SetExpectedCredentials(const UserContext& user_context) {
118 const std::string& password) { 117 expected_user_context_ = user_context;
119 expected_username_ = username; 118 if (authenticator_) {
120 expected_password_ = password;
121 if (authenticator_.get()) {
122 static_cast<MockAuthenticator*>(authenticator_.get())-> 119 static_cast<MockAuthenticator*>(authenticator_.get())->
123 SetExpectedCredentials(username, password); 120 SetExpectedCredentials(user_context);
124 } 121 }
125 } 122 }
126 123
127 } // namespace chromeos 124 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/fake_login_utils.h ('k') | chrome/browser/chromeos/login/lock/screen_locker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698