OLD | NEW |
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 #include "google_apis/gaia/gaia_oauth_client.h" | 5 #include "google_apis/gaia/gaia_oauth_client.h" |
6 | 6 |
7 #include "base/json/json_reader.h" | 7 #include "base/json/json_reader.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 int max_retries, | 57 int max_retries, |
58 Delegate* delegate); | 58 Delegate* delegate); |
59 void GetUserInfo(const std::string& oauth_access_token, | 59 void GetUserInfo(const std::string& oauth_access_token, |
60 int max_retries, | 60 int max_retries, |
61 Delegate* delegate); | 61 Delegate* delegate); |
62 void GetTokenInfo(const std::string& oauth_access_token, | 62 void GetTokenInfo(const std::string& oauth_access_token, |
63 int max_retries, | 63 int max_retries, |
64 Delegate* delegate); | 64 Delegate* delegate); |
65 | 65 |
66 // net::URLFetcherDelegate implementation. | 66 // net::URLFetcherDelegate implementation. |
67 virtual void OnURLFetchComplete(const net::URLFetcher* source) OVERRIDE; | 67 virtual void OnURLFetchComplete(const net::URLFetcher* source) override; |
68 | 68 |
69 private: | 69 private: |
70 friend class base::RefCountedThreadSafe<Core>; | 70 friend class base::RefCountedThreadSafe<Core>; |
71 | 71 |
72 enum RequestType { | 72 enum RequestType { |
73 NO_PENDING_REQUEST, | 73 NO_PENDING_REQUEST, |
74 TOKENS_FROM_AUTH_CODE, | 74 TOKENS_FROM_AUTH_CODE, |
75 REFRESH_TOKEN, | 75 REFRESH_TOKEN, |
76 TOKEN_INFO, | 76 TOKEN_INFO, |
77 USER_EMAIL, | 77 USER_EMAIL, |
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
393 return core_->GetUserInfo(access_token, max_retries, delegate); | 393 return core_->GetUserInfo(access_token, max_retries, delegate); |
394 } | 394 } |
395 | 395 |
396 void GaiaOAuthClient::GetTokenInfo(const std::string& access_token, | 396 void GaiaOAuthClient::GetTokenInfo(const std::string& access_token, |
397 int max_retries, | 397 int max_retries, |
398 Delegate* delegate) { | 398 Delegate* delegate) { |
399 return core_->GetTokenInfo(access_token, max_retries, delegate); | 399 return core_->GetTokenInfo(access_token, max_retries, delegate); |
400 } | 400 } |
401 | 401 |
402 } // namespace gaia | 402 } // namespace gaia |
OLD | NEW |