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/values.h" | 10 #include "base/values.h" |
(...skipping 26 matching lines...) Expand all Loading... |
37 void GetTokensFromAuthCode(const OAuthClientInfo& oauth_client_info, | 37 void GetTokensFromAuthCode(const OAuthClientInfo& oauth_client_info, |
38 const std::string& auth_code, | 38 const std::string& auth_code, |
39 int max_retries, | 39 int max_retries, |
40 GaiaOAuthClient::Delegate* delegate); | 40 GaiaOAuthClient::Delegate* delegate); |
41 void RefreshToken(const OAuthClientInfo& oauth_client_info, | 41 void RefreshToken(const OAuthClientInfo& oauth_client_info, |
42 const std::string& refresh_token, | 42 const std::string& refresh_token, |
43 int max_retries, | 43 int max_retries, |
44 GaiaOAuthClient::Delegate* delegate); | 44 GaiaOAuthClient::Delegate* delegate); |
45 | 45 |
46 // net::URLFetcherDelegate implementation. | 46 // net::URLFetcherDelegate implementation. |
47 virtual void OnURLFetchComplete(const net::URLFetcher* source); | 47 virtual void OnURLFetchComplete(const net::URLFetcher* source) OVERRIDE; |
48 | 48 |
49 private: | 49 private: |
50 friend class base::RefCountedThreadSafe<Core>; | 50 friend class base::RefCountedThreadSafe<Core>; |
51 virtual ~Core() {} | 51 virtual ~Core() {} |
52 | 52 |
53 void MakeGaiaRequest(const std::string& post_body, | 53 void MakeGaiaRequest(const std::string& post_body, |
54 int max_retries, | 54 int max_retries, |
55 GaiaOAuthClient::Delegate* delegate); | 55 GaiaOAuthClient::Delegate* delegate); |
56 void HandleResponse(const net::URLFetcher* source, | 56 void HandleResponse(const net::URLFetcher* source, |
57 bool* should_retry_request); | 57 bool* should_retry_request); |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 const std::string& refresh_token, | 199 const std::string& refresh_token, |
200 int max_retries, | 200 int max_retries, |
201 Delegate* delegate) { | 201 Delegate* delegate) { |
202 return core_->RefreshToken(oauth_client_info, | 202 return core_->RefreshToken(oauth_client_info, |
203 refresh_token, | 203 refresh_token, |
204 max_retries, | 204 max_retries, |
205 delegate); | 205 delegate); |
206 } | 206 } |
207 | 207 |
208 } // namespace gaia | 208 } // namespace gaia |
OLD | NEW |