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

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

Issue 12086018: GTTF: Add missing virtual destructors. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: trybots 4 Created 7 years, 10 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) 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 "chrome/browser/google_apis/base_operations.h" 10 #include "chrome/browser/google_apis/base_operations.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 OperationRegistry; 17 class OperationRegistry;
18 class AuthServiceObserver; 18 class AuthServiceObserver;
19 19
20 // Called when fetching of access token is complete. 20 // Called when fetching of access token is complete.
21 typedef base::Callback<void(GDataErrorCode error, 21 typedef base::Callback<void(GDataErrorCode error,
22 const std::string& access_token)> 22 const std::string& access_token)>
23 AuthStatusCallback; 23 AuthStatusCallback;
24 24
25 // This defines an interface for the authentication service which is required 25 // This defines an interface for the authentication service which is required
26 // by authenticated operations (AuthenticatedOperationInterface). 26 // by authenticated operations (AuthenticatedOperationInterface).
27 // All functions must be called on UI thread. 27 // All functions must be called on UI thread.
28 class AuthServiceInterface { 28 class AuthServiceInterface {
29 public: 29 public:
30 virtual ~AuthServiceInterface() { }
31
30 // Adds and removes the observer. AddObserver() should be called before 32 // Adds and removes the observer. AddObserver() should be called before
31 // Initialize() as it can change the refresh token. 33 // Initialize() as it can change the refresh token.
32 virtual void AddObserver(AuthServiceObserver* observer) = 0; 34 virtual void AddObserver(AuthServiceObserver* observer) = 0;
33 virtual void RemoveObserver(AuthServiceObserver* observer) = 0; 35 virtual void RemoveObserver(AuthServiceObserver* observer) = 0;
34 36
35 // Initializes the auth service. Starts TokenService to retrieve the 37 // Initializes the auth service. Starts TokenService to retrieve the
36 // refresh token. 38 // refresh token.
37 virtual void Initialize(Profile* profile) = 0; 39 virtual void Initialize(Profile* profile) = 0;
38 40
39 // Starts fetching OAuth2 access token from the refresh token. 41 // Starts fetching OAuth2 access token from the refresh token.
(...skipping 16 matching lines...) Expand all
56 // Clears OAuth2 access token. 58 // Clears OAuth2 access token.
57 virtual void ClearAccessToken() = 0; 59 virtual void ClearAccessToken() = 0;
58 60
59 // Clears OAuth2 refresh token. 61 // Clears OAuth2 refresh token.
60 virtual void ClearRefreshToken() = 0; 62 virtual void ClearRefreshToken() = 0;
61 }; 63 };
62 64
63 } // namespace google_apis 65 } // namespace google_apis
64 66
65 #endif // CHROME_BROWSER_GOOGLE_APIS_AUTH_SERVICE_INTERFACE_H_ 67 #endif // CHROME_BROWSER_GOOGLE_APIS_AUTH_SERVICE_INTERFACE_H_
OLDNEW
« no previous file with comments | « chrome/browser/favicon/favicon_handler_delegate.h ('k') | chrome/browser/managed_mode/managed_mode_url_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698