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

Unified Diff: remoting/host/gaia_oauth_client.h

Issue 11273024: Remove GaiaOauthClient and GaiaUserEmailFetcher from remoting. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 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 | « no previous file | remoting/host/gaia_oauth_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/gaia_oauth_client.h
diff --git a/remoting/host/gaia_oauth_client.h b/remoting/host/gaia_oauth_client.h
deleted file mode 100644
index 9da691123b3f4dd9793d143d74feccca0ceef3f7..0000000000000000000000000000000000000000
--- a/remoting/host/gaia_oauth_client.h
+++ /dev/null
@@ -1,70 +0,0 @@
-// Copyright (c) 2012 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 REMOTING_HOST_GAIA_OAUTH_CLIENT_H_
-#define REMOTING_HOST_GAIA_OAUTH_CLIENT_H_
-
-#include <string>
-
-#include "base/memory/ref_counted.h"
-#include "base/message_loop_proxy.h"
-
-namespace net {
-class URLRequestContextGetter;
-} // namespace net
-
-// A helper class to get and refresh OAuth tokens given an authorization code.
-//
-// TODO(jamiewalch): This is copied from chrome/common/net to avoid a dependency
-// on chrome. It would be better for this class to be moved into net to avoid
-// this duplication.
-namespace remoting {
-
-struct OAuthClientInfo {
- std::string client_id;
- std::string client_secret;
-};
-
-struct OAuthProviderInfo {
- static OAuthProviderInfo GetDefault();
-
- std::string access_token_url;
- std::string user_info_url;
-};
-
-class GaiaOAuthClient {
- public:
- class Delegate {
- public:
- virtual ~Delegate() { }
-
- // Invoked on a successful response to the RefreshToken request.
- virtual void OnRefreshTokenResponse(const std::string& user_email,
- const std::string& access_token,
- int expires_in_seconds) = 0;
- // Invoked when there is an OAuth error with one of the requests.
- virtual void OnOAuthError() = 0;
- // Invoked when there is a network error or upon receiving an
- // invalid response.
- virtual void OnNetworkError(int response_code) = 0;
- };
-
- GaiaOAuthClient(const OAuthProviderInfo& provider_info,
- net::URLRequestContextGetter* context_getter);
- ~GaiaOAuthClient();
-
- void RefreshToken(const OAuthClientInfo& oauth_client_info,
- const std::string& refresh_token,
- Delegate* delegate);
-
- private:
- // The guts of the implementation live in this class.
- class Core;
- scoped_refptr<Core> core_;
- DISALLOW_COPY_AND_ASSIGN(GaiaOAuthClient);
-};
-
-} // namespace remoting
-
-#endif // CHROME_COMMON_NET_GAIA_GAIA_OAUTH_CLIENT_H_
« no previous file with comments | « no previous file | remoting/host/gaia_oauth_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698