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

Unified Diff: remoting/host/gaia_oauth_client.h

Issue 10332285: Reland 137824 - was reverted by mistake (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 7 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
===================================================================
--- remoting/host/gaia_oauth_client.h (revision 138222)
+++ remoting/host/gaia_oauth_client.h (working copy)
@@ -21,15 +21,18 @@
// this duplication.
namespace remoting {
-// TODO(jamiewalch): Make this configurable if we ever support other providers.
-static const char kGaiaOAuth2Url[] =
- "https://accounts.google.com/o/oauth2/token";
-
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 {
@@ -37,7 +40,8 @@
virtual ~Delegate() { }
// Invoked on a successful response to the RefreshToken request.
- virtual void OnRefreshTokenResponse(const std::string& access_token,
+ 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;
@@ -45,7 +49,8 @@
// invalid response.
virtual void OnNetworkError(int response_code) = 0;
};
- GaiaOAuthClient(const std::string& gaia_url,
+
+ GaiaOAuthClient(const OAuthProviderInfo& provider_info,
net::URLRequestContextGetter* context_getter);
~GaiaOAuthClient();
« 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