OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 GOOGLE_APIS_GAIA_OAUTH2_TOKEN_SERVICE_H_ | 5 #ifndef GOOGLE_APIS_GAIA_OAUTH2_TOKEN_SERVICE_H_ |
6 #define GOOGLE_APIS_GAIA_OAUTH2_TOKEN_SERVICE_H_ | 6 #define GOOGLE_APIS_GAIA_OAUTH2_TOKEN_SERVICE_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 // TODO(davidroche): move this out of header file. | 211 // TODO(davidroche): move this out of header file. |
212 class RequestImpl : public base::SupportsWeakPtr<RequestImpl>, | 212 class RequestImpl : public base::SupportsWeakPtr<RequestImpl>, |
213 public base::NonThreadSafe, | 213 public base::NonThreadSafe, |
214 public Request { | 214 public Request { |
215 public: | 215 public: |
216 // |consumer| is required to outlive this. | 216 // |consumer| is required to outlive this. |
217 explicit RequestImpl(const std::string& account_id, Consumer* consumer); | 217 explicit RequestImpl(const std::string& account_id, Consumer* consumer); |
218 virtual ~RequestImpl(); | 218 virtual ~RequestImpl(); |
219 | 219 |
220 // Overridden from Request: | 220 // Overridden from Request: |
221 virtual std::string GetAccountId() const OVERRIDE; | 221 virtual std::string GetAccountId() const override; |
222 | 222 |
223 std::string GetConsumerId() const; | 223 std::string GetConsumerId() const; |
224 | 224 |
225 // Informs |consumer_| that this request is completed. | 225 // Informs |consumer_| that this request is completed. |
226 void InformConsumer(const GoogleServiceAuthError& error, | 226 void InformConsumer(const GoogleServiceAuthError& error, |
227 const std::string& access_token, | 227 const std::string& access_token, |
228 const base::Time& expiration_date); | 228 const base::Time& expiration_date); |
229 | 229 |
230 private: | 230 private: |
231 // |consumer_| to call back when this request completes. | 231 // |consumer_| to call back when this request completes. |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
398 static int max_fetch_retry_num_; | 398 static int max_fetch_retry_num_; |
399 | 399 |
400 FRIEND_TEST_ALL_PREFIXES(OAuth2TokenServiceTest, RequestParametersOrderTest); | 400 FRIEND_TEST_ALL_PREFIXES(OAuth2TokenServiceTest, RequestParametersOrderTest); |
401 FRIEND_TEST_ALL_PREFIXES(OAuth2TokenServiceTest, | 401 FRIEND_TEST_ALL_PREFIXES(OAuth2TokenServiceTest, |
402 SameScopesRequestedForDifferentClients); | 402 SameScopesRequestedForDifferentClients); |
403 | 403 |
404 DISALLOW_COPY_AND_ASSIGN(OAuth2TokenService); | 404 DISALLOW_COPY_AND_ASSIGN(OAuth2TokenService); |
405 }; | 405 }; |
406 | 406 |
407 #endif // GOOGLE_APIS_GAIA_OAUTH2_TOKEN_SERVICE_H_ | 407 #endif // GOOGLE_APIS_GAIA_OAUTH2_TOKEN_SERVICE_H_ |
OLD | NEW |