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

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

Issue 23678007: OAuth2LoginManager+MergeSessionThrottle hardening, multi-profle support (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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/path_service.h" 8 #include "base/path_service.h"
9 #include "chrome/browser/browser_process.h" 9 #include "chrome/browser/browser_process.h"
10 #include "chrome/browser/chrome_notification_types.h" 10 #include "chrome/browser/chrome_notification_types.h"
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 LoginStatusConsumer* consumer) { 91 LoginStatusConsumer* consumer) {
92 authenticator_ = 92 authenticator_ =
93 new MockAuthenticator(consumer, expected_username_, expected_password_); 93 new MockAuthenticator(consumer, expected_username_, expected_password_);
94 return authenticator_; 94 return authenticator_;
95 } 95 }
96 96
97 void FakeLoginUtils::RestoreAuthenticationSession(Profile* profile) { 97 void FakeLoginUtils::RestoreAuthenticationSession(Profile* profile) {
98 NOTREACHED() << "Method not implemented."; 98 NOTREACHED() << "Method not implemented.";
99 } 99 }
100 100
101 void FakeLoginUtils::StopBackgroundFetchers() {
102 NOTREACHED() << "Method not implemented.";
103 }
104
105 void FakeLoginUtils::InitRlzDelayed(Profile* user_profile) { 101 void FakeLoginUtils::InitRlzDelayed(Profile* user_profile) {
106 NOTREACHED() << "Method not implemented."; 102 NOTREACHED() << "Method not implemented.";
107 } 103 }
108 104
109 Profile* FakeLoginUtils::CreateProfile(const std::string& username_hash) { 105 Profile* FakeLoginUtils::CreateProfile(const std::string& username_hash) {
110 base::FilePath path; 106 base::FilePath path;
111 PathService::Get(chrome::DIR_USER_DATA, &path); 107 PathService::Get(chrome::DIR_USER_DATA, &path);
112 path = path.AppendASCII(chrome::kProfileDirPrefix + username_hash); 108 path = path.AppendASCII(chrome::kProfileDirPrefix + username_hash);
113 Profile* profile = g_browser_process->profile_manager()->GetProfile(path); 109 Profile* profile = g_browser_process->profile_manager()->GetProfile(path);
114 return profile; 110 return profile;
115 } 111 }
116 112
117 void FakeLoginUtils::SetExpectedCredentials(const std::string& username, 113 void FakeLoginUtils::SetExpectedCredentials(const std::string& username,
118 const std::string& password) { 114 const std::string& password) {
119 expected_username_ = username; 115 expected_username_ = username;
120 expected_password_ = password; 116 expected_password_ = password;
121 if (authenticator_.get()) { 117 if (authenticator_.get()) {
122 static_cast<MockAuthenticator*>(authenticator_.get())-> 118 static_cast<MockAuthenticator*>(authenticator_.get())->
123 SetExpectedCredentials(username, password); 119 SetExpectedCredentials(username, password);
124 } 120 }
125 } 121 }
126 122
127 } // namespace chromeos 123 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/fake_login_utils.h ('k') | chrome/browser/chromeos/login/login_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698