OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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_SIGNIN_PROFILE_OAUTH2_TOKEN_SERVICE_REQUEST_H_ | 5 #ifndef CHROME_BROWSER_SIGNIN_PROFILE_OAUTH2_TOKEN_SERVICE_REQUEST_H_ |
6 #define CHROME_BROWSER_SIGNIN_PROFILE_OAUTH2_TOKEN_SERVICE_REQUEST_H_ | 6 #define CHROME_BROWSER_SIGNIN_PROFILE_OAUTH2_TOKEN_SERVICE_REQUEST_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 16 matching lines...) Expand all Loading... |
27 // Creates and starts a request for |account_id| and |scopes|. | 27 // Creates and starts a request for |account_id| and |scopes|. |
28 // Uses the primary account id if |account_id| is the empty string. | 28 // Uses the primary account id if |account_id| is the empty string. |
29 static ProfileOAuth2TokenServiceRequest* CreateAndStart( | 29 static ProfileOAuth2TokenServiceRequest* CreateAndStart( |
30 Profile* profile, | 30 Profile* profile, |
31 const std::string& account_id, | 31 const std::string& account_id, |
32 const OAuth2TokenService::ScopeSet& scopes, | 32 const OAuth2TokenService::ScopeSet& scopes, |
33 OAuth2TokenService::Consumer* consumer); | 33 OAuth2TokenService::Consumer* consumer); |
34 | 34 |
35 virtual ~ProfileOAuth2TokenServiceRequest(); | 35 virtual ~ProfileOAuth2TokenServiceRequest(); |
36 | 36 |
| 37 // Overridden from Request: |
| 38 virtual std::string GetAccountId() const OVERRIDE; |
| 39 |
37 private: | 40 private: |
38 class Core; | 41 class Core; |
39 friend class Core; | 42 friend class Core; |
40 | 43 |
41 ProfileOAuth2TokenServiceRequest(Profile* profile, | 44 ProfileOAuth2TokenServiceRequest(Profile* profile, |
42 const std::string& account_id, | 45 const std::string& account_id, |
43 const OAuth2TokenService::ScopeSet& scopes, | 46 const OAuth2TokenService::ScopeSet& scopes, |
44 OAuth2TokenService::Consumer* consumer); | 47 OAuth2TokenService::Consumer* consumer); |
| 48 |
45 OAuth2TokenService::Consumer* const consumer_; | 49 OAuth2TokenService::Consumer* const consumer_; |
46 scoped_refptr<Core> core_; | 50 scoped_refptr<Core> core_; |
47 | 51 |
48 DISALLOW_COPY_AND_ASSIGN(ProfileOAuth2TokenServiceRequest); | 52 DISALLOW_COPY_AND_ASSIGN(ProfileOAuth2TokenServiceRequest); |
49 }; | 53 }; |
50 | 54 |
51 #endif // CHROME_BROWSER_SIGNIN_PROFILE_OAUTH2_TOKEN_SERVICE_REQUEST_H_ | 55 #endif // CHROME_BROWSER_SIGNIN_PROFILE_OAUTH2_TOKEN_SERVICE_REQUEST_H_ |
OLD | NEW |