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

Side by Side Diff: chrome/browser/google_apis/auth_service_interface.h

Issue 16424004: google_apis: Rename base_operations.h/cc to base_requests.h/cc (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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
« no previous file with comments | « no previous file | chrome/browser/google_apis/base_operations.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_GOOGLE_APIS_AUTH_SERVICE_INTERFACE_H_ 5 #ifndef CHROME_BROWSER_GOOGLE_APIS_AUTH_SERVICE_INTERFACE_H_
6 #define CHROME_BROWSER_GOOGLE_APIS_AUTH_SERVICE_INTERFACE_H_ 6 #define CHROME_BROWSER_GOOGLE_APIS_AUTH_SERVICE_INTERFACE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback_forward.h" 10 #include "base/callback_forward.h"
11 #include "chrome/browser/google_apis/gdata_errorcode.h" 11 #include "chrome/browser/google_apis/gdata_errorcode.h"
12 12
13 class Profile; 13 class Profile;
14 14
15 namespace google_apis { 15 namespace google_apis {
16 16
17 class AuthServiceObserver; 17 class AuthServiceObserver;
18 18
19 // Called when fetching of access token is complete. 19 // Called when fetching of access token is complete.
20 typedef base::Callback<void(GDataErrorCode error, 20 typedef base::Callback<void(GDataErrorCode error,
21 const std::string& access_token)> 21 const std::string& access_token)>
22 AuthStatusCallback; 22 AuthStatusCallback;
23 23
24 // This defines an interface for the authentication service which is required 24 // This defines an interface for the authentication service which is required
25 // by authenticated operations (AuthenticatedOperationInterface). 25 // by authenticated operations (AuthenticatedRequestInterface).
26 // All functions must be called on UI thread. 26 // All functions must be called on UI thread.
27 class AuthServiceInterface { 27 class AuthServiceInterface {
28 public: 28 public:
29 // Adds and removes the observer. AddObserver() should be called before 29 // Adds and removes the observer. AddObserver() should be called before
30 // Initialize() as it can change the refresh token. 30 // Initialize() as it can change the refresh token.
31 virtual void AddObserver(AuthServiceObserver* observer) = 0; 31 virtual void AddObserver(AuthServiceObserver* observer) = 0;
32 virtual void RemoveObserver(AuthServiceObserver* observer) = 0; 32 virtual void RemoveObserver(AuthServiceObserver* observer) = 0;
33 33
34 // Initializes the auth service. Starts TokenService to retrieve the 34 // Initializes the auth service. Starts TokenService to retrieve the
35 // refresh token. 35 // refresh token.
(...skipping 18 matching lines...) Expand all
54 // Clears OAuth2 access token. 54 // Clears OAuth2 access token.
55 virtual void ClearAccessToken() = 0; 55 virtual void ClearAccessToken() = 0;
56 56
57 // Clears OAuth2 refresh token. 57 // Clears OAuth2 refresh token.
58 virtual void ClearRefreshToken() = 0; 58 virtual void ClearRefreshToken() = 0;
59 }; 59 };
60 60
61 } // namespace google_apis 61 } // namespace google_apis
62 62
63 #endif // CHROME_BROWSER_GOOGLE_APIS_AUTH_SERVICE_INTERFACE_H_ 63 #endif // CHROME_BROWSER_GOOGLE_APIS_AUTH_SERVICE_INTERFACE_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/google_apis/base_operations.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698