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

Unified Diff: chrome/browser/chromeos/login/mock_authenticator.cc

Issue 11506006: [cros] RLZ tracking can be turned off via a flag file. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Re-apply ps#16, it got lost Created 8 years 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/login/mock_authenticator.cc
diff --git a/chrome/browser/chromeos/login/mock_authenticator.cc b/chrome/browser/chromeos/login/mock_authenticator.cc
index b195acaba8f68da356099679b76f6fb66e5f9713..923ffb5e7d6f4d60f5780a137722a4a3b8966986 100644
--- a/chrome/browser/chromeos/login/mock_authenticator.cc
+++ b/chrome/browser/chromeos/login/mock_authenticator.cc
@@ -12,10 +12,10 @@ using content::BrowserThread;
namespace chromeos {
void MockAuthenticator::AuthenticateToLogin(Profile* profile,
- const std::string& username,
- const std::string& password,
- const std::string& login_token,
- const std::string& login_captcha) {
+ const std::string& username,
+ const std::string& password,
+ const std::string& login_token,
+ const std::string& login_captcha) {
if (expected_username_ == username && expected_password_ == password) {
BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
base::Bind(&MockAuthenticator::OnLoginSuccess, this, false));
@@ -37,7 +37,7 @@ void MockAuthenticator::CompleteLogin(Profile* profile,
}
void MockAuthenticator::AuthenticateToUnlock(const std::string& username,
- const std::string& password) {
+ const std::string& password) {
AuthenticateToLogin(NULL /* not used */, username, password,
std::string(), std::string());
}
@@ -58,8 +58,7 @@ void MockAuthenticator::OnRetailModeLoginSuccess() {
consumer_->OnRetailModeLoginSuccess();
}
-void MockAuthenticator::OnLoginSuccess(
- bool request_pending) {
+void MockAuthenticator::OnLoginSuccess(bool request_pending) {
// If we want to be more like the real thing, we could save username
// in AuthenticateToLogin, but there's not much of a point.
consumer_->OnLoginSuccess(expected_username_,
@@ -72,57 +71,4 @@ void MockAuthenticator::OnLoginFailure(const LoginFailure& failure) {
consumer_->OnLoginFailure(failure);
}
-////////////////////////////////////////////////////////////////////////////////
-// TestLoginUtils
-
-TestLoginUtils::TestLoginUtils(const std::string& expected_username,
- const std::string& expected_password)
- : expected_username_(expected_username),
- expected_password_(expected_password) {
-}
-
-TestLoginUtils::~TestLoginUtils() {}
-
-void TestLoginUtils::PrepareProfile(
- const std::string& username,
- const std::string& display_email,
- const std::string& password,
- bool pending_requests,
- bool using_oauth,
- bool has_cookies,
- Delegate* delegate) {
- DCHECK_EQ(expected_username_, username);
- DCHECK_EQ(expected_password_, password);
- // Profile hasn't been loaded.
- delegate->OnProfilePrepared(NULL);
-}
-
-void TestLoginUtils::DelegateDeleted(Delegate* delegate) {
-}
-
-scoped_refptr<Authenticator> TestLoginUtils::CreateAuthenticator(
- LoginStatusConsumer* consumer) {
- return new MockAuthenticator(
- consumer, expected_username_, expected_password_);
-}
-
-std::string TestLoginUtils::GetOffTheRecordCommandLine(
- const GURL& start_url,
- const CommandLine& base_command_line,
- CommandLine* command_line) {
- return std::string();
-}
-
-void TestLoginUtils::TransferDefaultCookiesAndServerBoundCerts(
- Profile* default_profile,
- Profile* new_profile) {
-}
-
-void TestLoginUtils::TransferDefaultAuthCache(Profile* default_profile,
- Profile* new_profile) {
-}
-
-void TestLoginUtils::StopBackgroundFetchers() {
-}
-
} // namespace chromeos

Powered by Google App Engine
This is Rietveld 408576698