OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 WEBKIT_APPCACHE_APPCACHE_URL_REQUEST_JOB_H_ | 5 #ifndef WEBKIT_APPCACHE_APPCACHE_URL_REQUEST_JOB_H_ |
6 #define WEBKIT_APPCACHE_APPCACHE_URL_REQUEST_JOB_H_ | 6 #define WEBKIT_APPCACHE_APPCACHE_URL_REQUEST_JOB_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/task.h" | 10 #include "base/task.h" |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 // TODO(michaeln): does this apply to our cached responses? | 118 // TODO(michaeln): does this apply to our cached responses? |
119 // The payload we store should have been fully decoded prior to | 119 // The payload we store should have been fully decoded prior to |
120 // us storing it. Maybe we should strip the content-encoding headers | 120 // us storing it. Maybe we should strip the content-encoding headers |
121 // when writing the response to the cache. | 121 // when writing the response to the cache. |
122 // virtual bool GetContentEncodings( | 122 // virtual bool GetContentEncodings( |
123 // std::vector<Filter::FilterType>* encoding_types); | 123 // std::vector<Filter::FilterType>* encoding_types); |
124 | 124 |
125 // FilterContext methods | 125 // FilterContext methods |
126 virtual bool GetMimeType(std::string* mime_type) const; | 126 virtual bool GetMimeType(std::string* mime_type) const; |
127 virtual int GetResponseCode() const; | 127 virtual int GetResponseCode() const; |
128 virtual bool IsCachedContent() const { | 128 virtual bool IsCachedContent() const; |
129 return is_delivering_appcache_response(); | |
130 } | |
131 | 129 |
132 AppCacheStorage* storage_; | 130 AppCacheStorage* storage_; |
133 bool has_been_started_; | 131 bool has_been_started_; |
134 bool has_been_killed_; | 132 bool has_been_killed_; |
135 DeliveryType delivery_type_; | 133 DeliveryType delivery_type_; |
136 GURL manifest_url_; | 134 GURL manifest_url_; |
137 int64 cache_id_; | 135 int64 cache_id_; |
138 AppCacheEntry entry_; | 136 AppCacheEntry entry_; |
139 bool is_fallback_; | 137 bool is_fallback_; |
140 bool cache_entry_not_found_; | 138 bool cache_entry_not_found_; |
141 scoped_refptr<AppCacheResponseInfo> info_; | 139 scoped_refptr<AppCacheResponseInfo> info_; |
142 net::HttpByteRange range_requested_; | 140 net::HttpByteRange range_requested_; |
143 scoped_ptr<net::HttpResponseInfo> range_response_info_; | 141 scoped_ptr<net::HttpResponseInfo> range_response_info_; |
144 scoped_ptr<AppCacheResponseReader> reader_; | 142 scoped_ptr<AppCacheResponseReader> reader_; |
145 net::CompletionCallbackImpl<AppCacheURLRequestJob> read_callback_; | 143 net::CompletionCallbackImpl<AppCacheURLRequestJob> read_callback_; |
146 ScopedRunnableMethodFactory<AppCacheURLRequestJob> method_factory_; | 144 ScopedRunnableMethodFactory<AppCacheURLRequestJob> method_factory_; |
147 }; | 145 }; |
148 | 146 |
149 } // namespace appcache | 147 } // namespace appcache |
150 | 148 |
151 #endif // WEBKIT_APPCACHE_APPCACHE_REQUEST_HANDLER_H_ | 149 #endif // WEBKIT_APPCACHE_APPCACHE_REQUEST_HANDLER_H_ |
OLD | NEW |