| 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 #ifndef CHROME_BROWSER_GOOGLE_APIS_REQUEST_SENDER_H_ | 5 #ifndef CHROME_BROWSER_GOOGLE_APIS_REQUEST_SENDER_H_ |
| 6 #define CHROME_BROWSER_GOOGLE_APIS_REQUEST_SENDER_H_ | 6 #define CHROME_BROWSER_GOOGLE_APIS_REQUEST_SENDER_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 // Clears any authentication token and retries the request, which forces | 85 // Clears any authentication token and retries the request, which forces |
| 86 // an authentication token refresh. | 86 // an authentication token refresh. |
| 87 void RetryRequest(AuthenticatedRequestInterface* request); | 87 void RetryRequest(AuthenticatedRequestInterface* request); |
| 88 | 88 |
| 89 // Cancels the request. Used for implementing the returned closure of | 89 // Cancels the request. Used for implementing the returned closure of |
| 90 // StartRequestWithRetry. | 90 // StartRequestWithRetry. |
| 91 void CancelRequest( | 91 void CancelRequest( |
| 92 const base::WeakPtr<AuthenticatedRequestInterface>& request); | 92 const base::WeakPtr<AuthenticatedRequestInterface>& request); |
| 93 | 93 |
| 94 scoped_ptr<AuthServiceInterface> auth_service_; | 94 scoped_ptr<AuthServiceInterface> auth_service_; |
| 95 net::URLRequestContextGetter* url_request_context_getter_; // Not owned. | 95 scoped_refptr<net::URLRequestContextGetter> url_request_context_getter_; |
| 96 scoped_refptr<base::TaskRunner> blocking_task_runner_; | 96 scoped_refptr<base::TaskRunner> blocking_task_runner_; |
| 97 | 97 |
| 98 std::set<AuthenticatedRequestInterface*> in_flight_requests_; | 98 std::set<AuthenticatedRequestInterface*> in_flight_requests_; |
| 99 const std::string custom_user_agent_; | 99 const std::string custom_user_agent_; |
| 100 | 100 |
| 101 base::ThreadChecker thread_checker_; | 101 base::ThreadChecker thread_checker_; |
| 102 | 102 |
| 103 // Note: This should remain the last member so it'll be destroyed and | 103 // Note: This should remain the last member so it'll be destroyed and |
| 104 // invalidate its weak pointers before any other members are destroyed. | 104 // invalidate its weak pointers before any other members are destroyed. |
| 105 base::WeakPtrFactory<RequestSender> weak_ptr_factory_; | 105 base::WeakPtrFactory<RequestSender> weak_ptr_factory_; |
| 106 | 106 |
| 107 DISALLOW_COPY_AND_ASSIGN(RequestSender); | 107 DISALLOW_COPY_AND_ASSIGN(RequestSender); |
| 108 }; | 108 }; |
| 109 | 109 |
| 110 } // namespace google_apis | 110 } // namespace google_apis |
| 111 | 111 |
| 112 #endif // CHROME_BROWSER_GOOGLE_APIS_REQUEST_SENDER_H_ | 112 #endif // CHROME_BROWSER_GOOGLE_APIS_REQUEST_SENDER_H_ |
| OLD | NEW |