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 "net/url_request/url_request_http_job.h" | 5 #include "net/url_request/url_request_http_job.h" |
6 | 6 |
7 #include "base/base_switches.h" | 7 #include "base/base_switches.h" |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/bind_helpers.h" | 9 #include "base/bind_helpers.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 static const char kAvailDictionaryHeader[] = "Avail-Dictionary"; | 51 static const char kAvailDictionaryHeader[] = "Avail-Dictionary"; |
52 | 52 |
53 namespace net { | 53 namespace net { |
54 | 54 |
55 class URLRequestHttpJob::HttpFilterContext : public FilterContext { | 55 class URLRequestHttpJob::HttpFilterContext : public FilterContext { |
56 public: | 56 public: |
57 explicit HttpFilterContext(URLRequestHttpJob* job); | 57 explicit HttpFilterContext(URLRequestHttpJob* job); |
58 virtual ~HttpFilterContext(); | 58 virtual ~HttpFilterContext(); |
59 | 59 |
60 // FilterContext implementation. | 60 // FilterContext implementation. |
61 virtual bool GetMimeType(std::string* mime_type) const OVERRIDE; | 61 virtual bool GetMimeType(std::string* mime_type) const override; |
62 virtual bool GetURL(GURL* gurl) const OVERRIDE; | 62 virtual bool GetURL(GURL* gurl) const override; |
63 virtual bool GetContentDisposition(std::string* disposition) const OVERRIDE; | 63 virtual bool GetContentDisposition(std::string* disposition) const override; |
64 virtual base::Time GetRequestTime() const OVERRIDE; | 64 virtual base::Time GetRequestTime() const override; |
65 virtual bool IsCachedContent() const OVERRIDE; | 65 virtual bool IsCachedContent() const override; |
66 virtual bool IsDownload() const OVERRIDE; | 66 virtual bool IsDownload() const override; |
67 virtual bool SdchResponseExpected() const OVERRIDE; | 67 virtual bool SdchResponseExpected() const override; |
68 virtual int64 GetByteReadCount() const OVERRIDE; | 68 virtual int64 GetByteReadCount() const override; |
69 virtual int GetResponseCode() const OVERRIDE; | 69 virtual int GetResponseCode() const override; |
70 virtual const URLRequestContext* GetURLRequestContext() const OVERRIDE; | 70 virtual const URLRequestContext* GetURLRequestContext() const override; |
71 virtual void RecordPacketStats(StatisticSelector statistic) const OVERRIDE; | 71 virtual void RecordPacketStats(StatisticSelector statistic) const override; |
72 | 72 |
73 // Method to allow us to reset filter context for a response that should have | 73 // Method to allow us to reset filter context for a response that should have |
74 // been SDCH encoded when there is an update due to an explicit HTTP header. | 74 // been SDCH encoded when there is an update due to an explicit HTTP header. |
75 void ResetSdchResponseToFalse(); | 75 void ResetSdchResponseToFalse(); |
76 | 76 |
77 private: | 77 private: |
78 URLRequestHttpJob* job_; | 78 URLRequestHttpJob* job_; |
79 | 79 |
80 DISALLOW_COPY_AND_ASSIGN(HttpFilterContext); | 80 DISALLOW_COPY_AND_ASSIGN(HttpFilterContext); |
81 }; | 81 }; |
(...skipping 1435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1517 return override_response_headers_.get() ? | 1517 return override_response_headers_.get() ? |
1518 override_response_headers_.get() : | 1518 override_response_headers_.get() : |
1519 transaction_->GetResponseInfo()->headers.get(); | 1519 transaction_->GetResponseInfo()->headers.get(); |
1520 } | 1520 } |
1521 | 1521 |
1522 void URLRequestHttpJob::NotifyURLRequestDestroyed() { | 1522 void URLRequestHttpJob::NotifyURLRequestDestroyed() { |
1523 awaiting_callback_ = false; | 1523 awaiting_callback_ = false; |
1524 } | 1524 } |
1525 | 1525 |
1526 } // namespace net | 1526 } // namespace net |
OLD | NEW |