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

Unified Diff: components/arc/auth/arc_auth_fetcher.h

Issue 1847463002: arc: Use v2/auth LSO page. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 4 years, 9 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
« no previous file with comments | « components/arc/auth/DEPS ('k') | components/arc/auth/arc_auth_fetcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/arc/auth/arc_auth_fetcher.h
diff --git a/components/arc/auth/arc_auth_fetcher.h b/components/arc/auth/arc_auth_fetcher.h
deleted file mode 100644
index bf99a50db3fc9d0ccdde01c817553ac9064aac80..0000000000000000000000000000000000000000
--- a/components/arc/auth/arc_auth_fetcher.h
+++ /dev/null
@@ -1,63 +0,0 @@
-// Copyright 2016 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 COMPONENTS_ARC_AUTH_ARC_AUTH_FETCHER_H_
-#define COMPONENTS_ARC_AUTH_ARC_AUTH_FETCHER_H_
-
-#include <string>
-
-#include "base/macros.h"
-#include "google_apis/gaia/gaia_auth_consumer.h"
-#include "google_apis/gaia/gaia_auth_fetcher.h"
-
-class GURL;
-
-namespace net {
-class URLRequestContextGetter;
-}
-
-namespace arc {
-
-// Fetches ARC auth code. Fetching process starts automatically on creation.
-class ArcAuthFetcher : public GaiaAuthConsumer {
- public:
- // Returns a result of ARC auth code fetching.
- class Delegate {
- public:
- // Called when code was fetched.
- virtual void OnAuthCodeFetched(const std::string& code) = 0;
- // Called when additional UI authorization is required.
- virtual void OnAuthCodeNeedUI() = 0;
- // Called when auth code cannot be received.
- virtual void OnAuthCodeFailed() = 0;
-
- protected:
- virtual ~Delegate() = default;
- };
-
- ArcAuthFetcher(net::URLRequestContextGetter* getter, Delegate* delegate);
- ~ArcAuthFetcher() override = default;
-
- // GaiaAuthConsumer:
- void OnClientOAuthCode(const std::string& auth_code) override;
- void OnClientOAuthFailure(const GoogleServiceAuthError& error) override;
-
- // Helper function to compose target URL for current user, also is used in
- // test.
- static GURL CreateURL();
-
- private:
- void FetchAuthCode();
-
- // Unowned pointer.
- Delegate* const delegate_;
-
- GaiaAuthFetcher auth_fetcher_;
-
- DISALLOW_COPY_AND_ASSIGN(ArcAuthFetcher);
-};
-
-} // namespace arc
-
-#endif // COMPONENTS_ARC_AUTH_ARC_AUTH_FETCHER_H_
« no previous file with comments | « components/arc/auth/DEPS ('k') | components/arc/auth/arc_auth_fetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698