| 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 NET_URL_REQUEST_URL_REQUEST_HTTP_JOB_H_ | 5 #ifndef NET_URL_REQUEST_URL_REQUEST_HTTP_JOB_H_ |
| 6 #define NET_URL_REQUEST_URL_REQUEST_HTTP_JOB_H_ | 6 #define NET_URL_REQUEST_URL_REQUEST_HTTP_JOB_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
| 12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
| 13 #include "base/memory/weak_ptr.h" | 13 #include "base/memory/weak_ptr.h" |
| 14 #include "base/time/time.h" | 14 #include "base/time/time.h" |
| 15 #include "net/base/auth.h" | 15 #include "net/base/auth.h" |
| 16 #include "net/base/completion_callback.h" | 16 #include "net/base/completion_callback.h" |
| 17 #include "net/base/net_export.h" | 17 #include "net/base/net_export.h" |
| 18 #include "net/base/sdch_manager.h" | 18 #include "net/base/sdch_manager.h" |
| 19 #include "net/cookies/cookie_store.h" | 19 #include "net/cookies/cookie_store.h" |
| 20 #include "net/filter/filter.h" | 20 #include "net/filter/filter.h" |
| 21 #include "net/http/http_request_info.h" | 21 #include "net/http/http_request_info.h" |
| 22 #include "net/socket/connection_attempts.h" | 22 #include "net/socket/connection_attempts.h" |
| 23 #include "net/url_request/url_request_backoff_manager.h" |
| 23 #include "net/url_request/url_request_job.h" | 24 #include "net/url_request/url_request_job.h" |
| 24 #include "net/url_request/url_request_throttler_entry_interface.h" | 25 #include "net/url_request/url_request_throttler_entry_interface.h" |
| 25 | 26 |
| 26 namespace net { | 27 namespace net { |
| 27 | 28 |
| 28 class HttpRequestHeaders; | 29 class HttpRequestHeaders; |
| 29 class HttpResponseHeaders; | 30 class HttpResponseHeaders; |
| 30 class HttpResponseInfo; | 31 class HttpResponseInfo; |
| 31 class HttpTransaction; | 32 class HttpTransaction; |
| 32 class HttpUserAgentSettings; | 33 class HttpUserAgentSettings; |
| (...skipping 29 matching lines...) Expand all Loading... |
| 62 private: | 63 private: |
| 63 enum CompletionCause { | 64 enum CompletionCause { |
| 64 ABORTED, | 65 ABORTED, |
| 65 FINISHED | 66 FINISHED |
| 66 }; | 67 }; |
| 67 | 68 |
| 68 typedef base::RefCountedData<bool> SharedBoolean; | 69 typedef base::RefCountedData<bool> SharedBoolean; |
| 69 | 70 |
| 70 class HttpFilterContext; | 71 class HttpFilterContext; |
| 71 | 72 |
| 73 // Shadows URLRequestJob's version of this method. |
| 74 void NotifyBeforeNetworkStart(bool* defer); |
| 75 |
| 72 // Shadows URLRequestJob's version of this method so we can grab cookies. | 76 // Shadows URLRequestJob's version of this method so we can grab cookies. |
| 73 void NotifyHeadersComplete(); | 77 void NotifyHeadersComplete(); |
| 74 | 78 |
| 75 // Shadows URLRequestJob's method so we can record histograms. | 79 // Shadows URLRequestJob's method so we can record histograms. |
| 76 void NotifyDone(const URLRequestStatus& status); | 80 void NotifyDone(const URLRequestStatus& status); |
| 77 | 81 |
| 78 void DestroyTransaction(); | 82 void DestroyTransaction(); |
| 79 | 83 |
| 80 void AddExtraHeaders(); | 84 void AddExtraHeaders(); |
| 81 void AddCookieHeaderAndStart(); | 85 void AddCookieHeaderAndStart(); |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 258 | 262 |
| 259 // Flag used to verify that |this| is not deleted while we are awaiting | 263 // Flag used to verify that |this| is not deleted while we are awaiting |
| 260 // a callback from the NetworkDelegate. Used as a fail-fast mechanism. | 264 // a callback from the NetworkDelegate. Used as a fail-fast mechanism. |
| 261 // True if we are waiting a callback and | 265 // True if we are waiting a callback and |
| 262 // NetworkDelegate::NotifyURLRequestDestroyed has not been called, yet, | 266 // NetworkDelegate::NotifyURLRequestDestroyed has not been called, yet, |
| 263 // to inform the NetworkDelegate that it may not call back. | 267 // to inform the NetworkDelegate that it may not call back. |
| 264 bool awaiting_callback_; | 268 bool awaiting_callback_; |
| 265 | 269 |
| 266 const HttpUserAgentSettings* http_user_agent_settings_; | 270 const HttpUserAgentSettings* http_user_agent_settings_; |
| 267 | 271 |
| 272 URLRequestBackoffManager* backoff_manager_; |
| 273 |
| 268 base::WeakPtrFactory<URLRequestHttpJob> weak_factory_; | 274 base::WeakPtrFactory<URLRequestHttpJob> weak_factory_; |
| 269 | 275 |
| 270 DISALLOW_COPY_AND_ASSIGN(URLRequestHttpJob); | 276 DISALLOW_COPY_AND_ASSIGN(URLRequestHttpJob); |
| 271 }; | 277 }; |
| 272 | 278 |
| 273 } // namespace net | 279 } // namespace net |
| 274 | 280 |
| 275 #endif // NET_URL_REQUEST_URL_REQUEST_HTTP_JOB_H_ | 281 #endif // NET_URL_REQUEST_URL_REQUEST_HTTP_JOB_H_ |
| OLD | NEW |