| OLD | NEW |
| 1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 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 <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "base/scoped_ptr.h" | 12 #include "base/scoped_ptr.h" |
| 13 #include "net/base/auth.h" | 13 #include "net/base/auth.h" |
| 14 #include "net/base/completion_callback.h" | 14 #include "net/base/completion_callback.h" |
| 15 #include "net/http/http_request_info.h" | 15 #include "net/http/http_request_info.h" |
| 16 #include "net/url_request/url_request_job.h" | 16 #include "net/url_request/url_request_job.h" |
| 17 | 17 |
| 18 namespace net { | 18 namespace net { |
| 19 class HttpResponseInfo; | 19 class HttpResponseInfo; |
| 20 class HttpTransaction; | 20 class HttpTransaction; |
| 21 } | 21 } |
| 22 class URLRequestContext; | 22 class URLRequestContext; |
| 23 | 23 |
| 24 // A URLRequestJob subclass that is built on top of HttpTransaction. It | 24 // A URLRequestJob subclass that is built on top of HttpTransaction. It |
| 25 // provides an implementation for both HTTP and HTTPS. | 25 // provides an implementation for both HTTP and HTTPS. |
| 26 class URLRequestHttpJob : public URLRequestJob { | 26 class URLRequestHttpJob : public URLRequestJob { |
| 27 public: | 27 public: |
| 28 static URLRequestJob* Factory(URLRequest* request, const std::string& scheme); | 28 static URLRequestJob* Factory(URLRequest* request, const std::string& scheme); |
| 29 | 29 |
| 30 virtual ~URLRequestHttpJob(); | |
| 31 | |
| 32 protected: | 30 protected: |
| 33 explicit URLRequestHttpJob(URLRequest* request); | 31 explicit URLRequestHttpJob(URLRequest* request); |
| 34 | 32 |
| 35 // URLRequestJob methods: | 33 // URLRequestJob methods: |
| 36 virtual void SetUpload(net::UploadData* upload); | 34 virtual void SetUpload(net::UploadData* upload); |
| 37 virtual void SetExtraRequestHeaders(const std::string& headers); | 35 virtual void SetExtraRequestHeaders(const std::string& headers); |
| 38 virtual void Start(); | 36 virtual void Start(); |
| 39 virtual void Kill(); | 37 virtual void Kill(); |
| 40 virtual net::LoadState GetLoadState() const; | 38 virtual net::LoadState GetLoadState() const; |
| 41 virtual uint64 GetUploadProgress() const; | 39 virtual uint64 GetUploadProgress() const; |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 | 107 |
| 110 // For SDCH latency experiments, when we are able to do SDCH, we may enable | 108 // For SDCH latency experiments, when we are able to do SDCH, we may enable |
| 111 // either an SDCH latency test xor a pass through test. The following bools | 109 // either an SDCH latency test xor a pass through test. The following bools |
| 112 // indicate what we decided on for this instance. | 110 // indicate what we decided on for this instance. |
| 113 bool sdch_test_activated_; // Advertising a dictionary for sdch. | 111 bool sdch_test_activated_; // Advertising a dictionary for sdch. |
| 114 bool sdch_test_control_; // Not even accepting-content sdch. | 112 bool sdch_test_control_; // Not even accepting-content sdch. |
| 115 | 113 |
| 116 // For recording of stats, we need to remember if this is cached content. | 114 // For recording of stats, we need to remember if this is cached content. |
| 117 bool is_cached_content_; | 115 bool is_cached_content_; |
| 118 | 116 |
| 117 private: |
| 118 virtual ~URLRequestHttpJob(); |
| 119 |
| 119 DISALLOW_COPY_AND_ASSIGN(URLRequestHttpJob); | 120 DISALLOW_COPY_AND_ASSIGN(URLRequestHttpJob); |
| 120 }; | 121 }; |
| 121 | 122 |
| 122 #endif // NET_URL_REQUEST_URL_REQUEST_HTTP_JOB_H_ | 123 #endif // NET_URL_REQUEST_URL_REQUEST_HTTP_JOB_H_ |
| OLD | NEW |