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

Unified Diff: chrome/browser/chromeos/login/auth/online_attempt_host.h

Issue 402403004: Refactoring : Move OnlineAttempt to chromeos/login (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Yet another merge with ToT Created 6 years, 4 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: chrome/browser/chromeos/login/auth/online_attempt_host.h
diff --git a/chrome/browser/chromeos/login/auth/online_attempt_host.h b/chrome/browser/chromeos/login/auth/online_attempt_host.h
deleted file mode 100644
index e7d26727b0bff11b8ab4896a5f24718e494e5b73..0000000000000000000000000000000000000000
--- a/chrome/browser/chromeos/login/auth/online_attempt_host.h
+++ /dev/null
@@ -1,69 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// 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_HOST_H_
-#define CHROME_BROWSER_CHROMEOS_LOGIN_AUTH_ONLINE_ATTEMPT_HOST_H_
-
-#include <string>
-
-#include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
-#include "base/memory/weak_ptr.h"
-#include "chromeos/login/auth/auth_attempt_state_resolver.h"
-#include "chromeos/login/auth/user_context.h"
-
-namespace content {
-class BrowserContext;
-}
-
-namespace chromeos {
-
-class AuthAttemptState;
-class OnlineAttempt;
-class UserContext;
-
-// Helper class which hosts OnlineAttempt for online credentials checking.
-class OnlineAttemptHost : public AuthAttemptStateResolver {
- public:
- class Delegate {
- public:
- // Called after user_context were checked online.
- virtual void OnChecked(const std::string& username, bool success) = 0;
- };
-
- explicit OnlineAttemptHost(Delegate *delegate);
- virtual ~OnlineAttemptHost();
-
- // Performs an online check of the credentials in |user_context| and invokes
- // the delegate's OnChecked() with the result. Note that only one check can be
- // in progress at any given time. If this method is invoked with a different
- // |user_context| than a check currently in progress, the current check will
- // be silently aborted.
- void Check(content::BrowserContext* auth_context,
- const UserContext& user_context);
-
- // Resets the checking process.
- void Reset();
-
- // AuthAttemptStateResolver overrides.
- // Executed on IO thread.
- virtual void Resolve() OVERRIDE;
-
- // Does an actual resolve on UI thread.
- void ResolveOnUIThread(bool success);
-
- private:
- Delegate* delegate_;
- UserContext current_attempt_user_context_;
- scoped_ptr<OnlineAttempt> online_attempt_;
- scoped_ptr<AuthAttemptState> state_;
- base::WeakPtrFactory<OnlineAttemptHost> weak_ptr_factory_;
-
- DISALLOW_COPY_AND_ASSIGN(OnlineAttemptHost);
-};
-
-} // namespace chromeos
-
-#endif // CHROME_BROWSER_CHROMEOS_LOGIN_AUTH_ONLINE_ATTEMPT_HOST_H_
-
« no previous file with comments | « chrome/browser/chromeos/login/auth/online_attempt.cc ('k') | chrome/browser/chromeos/login/auth/online_attempt_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698