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

Unified Diff: chromeos/login/auth/online_attempt.cc

Issue 402403004: Refactoring : Move OnlineAttempt to chromeos/login (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove chromeos export Created 6 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: chromeos/login/auth/online_attempt.cc
diff --git a/chrome/browser/chromeos/login/auth/online_attempt.cc b/chromeos/login/auth/online_attempt.cc
similarity index 93%
rename from chrome/browser/chromeos/login/auth/online_attempt.cc
rename to chromeos/login/auth/online_attempt.cc
index 5dfed04fdff55fdbc10f493ed251778a257be38d..7b2a734e02bfa8a38690a2d59b7d602dc46388f5 100644
--- a/chrome/browser/chromeos/login/auth/online_attempt.cc
+++ b/chromeos/login/auth/online_attempt.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/chromeos/login/auth/online_attempt.h"
+#include "chromeos/login/auth/online_attempt.h"
#include <string>
@@ -48,11 +48,11 @@ OnlineAttempt::~OnlineAttempt() {
void OnlineAttempt::Initiate(content::BrowserContext* auth_context) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- client_fetcher_.reset(
- new GaiaAuthFetcher(this, GaiaConstants::kChromeOSSource,
- auth_context->GetRequestContext()));
+ client_fetcher_.reset(new GaiaAuthFetcher(
+ this, GaiaConstants::kChromeOSSource, auth_context->GetRequestContext()));
BrowserThread::PostTask(
- BrowserThread::UI, FROM_HERE,
+ BrowserThread::UI,
+ FROM_HERE,
base::Bind(&OnlineAttempt::TryClientLogin, weak_factory_.GetWeakPtr()));
}
@@ -79,8 +79,7 @@ void OnlineAttempt::OnClientLoginSuccess(
TriggerResolve(AuthFailure::AuthFailureNone());
}
-void OnlineAttempt::OnClientLoginFailure(
- const GoogleServiceAuthError& error) {
+void OnlineAttempt::OnClientLoginFailure(const GoogleServiceAuthError& error) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
weak_factory_.InvalidateWeakPtrs();
@@ -122,7 +121,8 @@ void OnlineAttempt::TryClientLogin() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
BrowserThread::PostDelayedTask(
- BrowserThread::UI, FROM_HERE,
+ BrowserThread::UI,
+ FROM_HERE,
base::Bind(&OnlineAttempt::CancelClientLogin, weak_factory_.GetWeakPtr()),
base::TimeDelta::FromMilliseconds(kClientLoginTimeoutMs));

Powered by Google App Engine
This is Rietveld 408576698