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

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

Issue 402403004: Refactoring : Move OnlineAttempt to chromeos/login (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Got rid of BrowserContext 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.h
diff --git a/chrome/browser/chromeos/login/auth/online_attempt.h b/chromeos/login/auth/online_attempt.h
similarity index 84%
rename from chrome/browser/chromeos/login/auth/online_attempt.h
rename to chromeos/login/auth/online_attempt.h
index b12b33296d825314dfc78d473df35ccffad532f1..3b6ef136d4685a6538c8533f9687e5a29485d990 100644
--- a/chrome/browser/chromeos/login/auth/online_attempt.h
+++ b/chromeos/login/auth/online_attempt.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_CHROMEOS_LOGIN_AUTH_ONLINE_ATTEMPT_H_
-#define CHROME_BROWSER_CHROMEOS_LOGIN_AUTH_ONLINE_ATTEMPT_H_
+#ifndef CHROMEOS_LOGIN_AUTH_ONLINE_ATTEMPT_H_
+#define CHROMEOS_LOGIN_AUTH_ONLINE_ATTEMPT_H_
#include <string>
@@ -12,6 +12,7 @@
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
+#include "chromeos/chromeos_export.h"
#include "chromeos/login/auth/auth_status_consumer.h"
#include "google_apis/gaia/gaia_auth_consumer.h"
#include "google_apis/gaia/google_service_auth_error.h"
@@ -22,12 +23,15 @@ namespace content {
class BrowserContext;
}
+namespace net {
+class URLRequestContextGetter;
+}
+
namespace chromeos {
class AuthAttemptState;
class AuthAttemptStateResolver;
-class OnlineAttempt
- : public GaiaAuthConsumer {
+class CHROMEOS_EXPORT OnlineAttempt : public GaiaAuthConsumer {
public:
OnlineAttempt(AuthAttemptState* current_attempt,
AuthAttemptStateResolver* callback);
@@ -37,7 +41,7 @@ class OnlineAttempt
// Status will be recorded in |current_attempt|, and resolver_->Resolve() will
// be called on the IO thread when useful state is available.
// Must be called on the UI thread.
- void Initiate(content::BrowserContext* auth_context);
+ void Initiate(net::URLRequestContextGetter* request_context);
// GaiaAuthConsumer overrides. Callbacks from GaiaAuthFetcher
virtual void OnClientLoginFailure(
@@ -60,6 +64,8 @@ class OnlineAttempt
bool HasPendingFetch();
void CancelRequest();
+ scoped_refptr<base::MessageLoopProxy> message_loop_;
+
AuthAttemptState* const attempt_;
AuthAttemptStateResolver* const resolver_;
@@ -78,4 +84,4 @@ class OnlineAttempt
} // namespace chromeos
-#endif // CHROME_BROWSER_CHROMEOS_LOGIN_AUTH_ONLINE_ATTEMPT_H_
+#endif // CHROMEOS_LOGIN_AUTH_ONLINE_ATTEMPT_H_

Powered by Google App Engine
This is Rietveld 408576698