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

Side by Side Diff: chrome/browser/net/gaia/gaia_oauth_consumer.h

Issue 7574009: Added OAuth support to TokenService (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Tweaked mock for OnOAuthWrapBridgeFailure. Created 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_NET_GAIA_GAIA_OAUTH_CONSUMER_H_ 5 #ifndef CHROME_BROWSER_NET_GAIA_GAIA_OAUTH_CONSUMER_H_
6 #define CHROME_BROWSER_NET_GAIA_GAIA_OAUTH_CONSUMER_H_ 6 #define CHROME_BROWSER_NET_GAIA_GAIA_OAUTH_CONSUMER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
11 class GoogleServiceAuthError; 11 class GoogleServiceAuthError;
12 12
13 // An interface that defines the callbacks for objects to which 13 // An interface that defines the callbacks for objects to which
14 // GaiaOAuthFetcher can return data. 14 // GaiaOAuthFetcher can return data.
15 class GaiaOAuthConsumer { 15 class GaiaOAuthConsumer {
16 public: 16 public:
17 virtual ~GaiaOAuthConsumer() {} 17 virtual ~GaiaOAuthConsumer() {}
18 18
19 virtual void OnGetOAuthTokenSuccess(const std::string& oauth_token) {} 19 virtual void OnGetOAuthTokenSuccess(const std::string& oauth_token) {}
20 virtual void OnGetOAuthTokenFailure() {} 20 virtual void OnGetOAuthTokenFailure() {}
21 21
22 virtual void OnOAuthGetAccessTokenSuccess(const std::string& token, 22 virtual void OnOAuthGetAccessTokenSuccess(const std::string& token,
23 const std::string& secret) {} 23 const std::string& secret) {}
24 virtual void OnOAuthGetAccessTokenFailure( 24 virtual void OnOAuthGetAccessTokenFailure(
25 const GoogleServiceAuthError& error) {} 25 const GoogleServiceAuthError& error) {}
26 26
27 virtual void OnOAuthWrapBridgeSuccess(const std::string& service_name, 27 virtual void OnOAuthWrapBridgeSuccess(const std::string& service_scope,
28 const std::string& token, 28 const std::string& token,
29 const std::string& expires_in) {} 29 const std::string& expires_in) {}
30 virtual void OnOAuthWrapBridgeFailure(const GoogleServiceAuthError& error) {} 30 virtual void OnOAuthWrapBridgeFailure(const std::string& service_scope,
31 const GoogleServiceAuthError& error) {}
31 32
32 virtual void OnUserInfoSuccess(const std::string& email) {} 33 virtual void OnUserInfoSuccess(const std::string& email) {}
33 virtual void OnUserInfoFailure(const GoogleServiceAuthError& error) {} 34 virtual void OnUserInfoFailure(const GoogleServiceAuthError& error) {}
34 35
35 virtual void OnOAuthLoginSuccess(const std::string& sid, 36 virtual void OnOAuthLoginSuccess(const std::string& sid,
36 const std::string& lsid, 37 const std::string& lsid,
37 const std::string& auth) {} 38 const std::string& auth) {}
38 virtual void OnOAuthLoginFailure(const GoogleServiceAuthError& error) {} 39 virtual void OnOAuthLoginFailure(const GoogleServiceAuthError& error) {}
39 }; 40 };
40 41
41 #endif // CHROME_BROWSER_NET_GAIA_GAIA_OAUTH_CONSUMER_H_ 42 #endif // CHROME_BROWSER_NET_GAIA_GAIA_OAUTH_CONSUMER_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/online_attempt.cc ('k') | chrome/browser/net/gaia/gaia_oauth_fetcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698