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 WEBKIT_BROWSER_APPCACHE_APPCACHE_URL_REQUEST_JOB_H_ | 5 #ifndef CONTENT_BROWSER_APPCACHE_APPCACHE_URL_REQUEST_JOB_H_ |
6 #define WEBKIT_BROWSER_APPCACHE_APPCACHE_URL_REQUEST_JOB_H_ | 6 #define CONTENT_BROWSER_APPCACHE_APPCACHE_URL_REQUEST_JOB_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
| 11 #include "content/browser/appcache/appcache_entry.h" |
| 12 #include "content/browser/appcache/appcache_executable_handler.h" |
| 13 #include "content/browser/appcache/appcache_response.h" |
| 14 #include "content/browser/appcache/appcache_storage.h" |
| 15 #include "content/common/content_export.h" |
11 #include "net/http/http_byte_range.h" | 16 #include "net/http/http_byte_range.h" |
12 #include "net/url_request/url_request_job.h" | 17 #include "net/url_request/url_request_job.h" |
13 #include "webkit/browser/appcache/appcache_entry.h" | |
14 #include "webkit/browser/appcache/appcache_executable_handler.h" | |
15 #include "webkit/browser/appcache/appcache_response.h" | |
16 #include "webkit/browser/appcache/appcache_storage.h" | |
17 #include "webkit/browser/webkit_storage_browser_export.h" | |
18 | 18 |
19 namespace content { | 19 namespace content { |
20 class AppCacheRequestHandlerTest; | 20 class AppCacheRequestHandlerTest; |
21 class AppCacheURLRequestJobTest; | 21 class AppCacheURLRequestJobTest; |
22 } | 22 } |
23 | 23 |
24 namespace net { | 24 namespace net { |
25 class GrowableIOBuffer; | 25 class GrowableIOBuffer; |
26 }; | 26 }; |
27 | 27 |
28 namespace appcache { | 28 namespace content { |
29 | 29 |
30 class AppCacheHost; | 30 class AppCacheHost; |
31 | 31 |
32 // A net::URLRequestJob derivative that knows how to return a response stored | 32 // A net::URLRequestJob derivative that knows how to return a response stored |
33 // in the appcache. | 33 // in the appcache. |
34 class WEBKIT_STORAGE_BROWSER_EXPORT AppCacheURLRequestJob | 34 class CONTENT_EXPORT AppCacheURLRequestJob |
35 : public net::URLRequestJob, | 35 : public net::URLRequestJob, |
36 public AppCacheStorage::Delegate { | 36 public AppCacheStorage::Delegate { |
37 public: | 37 public: |
38 AppCacheURLRequestJob(net::URLRequest* request, | 38 AppCacheURLRequestJob(net::URLRequest* request, |
39 net::NetworkDelegate* network_delegate, | 39 net::NetworkDelegate* network_delegate, |
40 AppCacheStorage* storage, | 40 AppCacheStorage* storage, |
41 AppCacheHost* host, | 41 AppCacheHost* host, |
42 bool is_main_resource); | 42 bool is_main_resource); |
43 | 43 |
44 // Informs the job of what response it should deliver. Only one of these | 44 // Informs the job of what response it should deliver. Only one of these |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 scoped_refptr<net::GrowableIOBuffer> handler_source_buffer_; | 170 scoped_refptr<net::GrowableIOBuffer> handler_source_buffer_; |
171 scoped_ptr<AppCacheResponseReader> handler_source_reader_; | 171 scoped_ptr<AppCacheResponseReader> handler_source_reader_; |
172 net::HttpByteRange range_requested_; | 172 net::HttpByteRange range_requested_; |
173 scoped_ptr<net::HttpResponseInfo> range_response_info_; | 173 scoped_ptr<net::HttpResponseInfo> range_response_info_; |
174 scoped_ptr<AppCacheResponseReader> reader_; | 174 scoped_ptr<AppCacheResponseReader> reader_; |
175 scoped_refptr<AppCache> cache_; | 175 scoped_refptr<AppCache> cache_; |
176 scoped_refptr<AppCacheGroup> group_; | 176 scoped_refptr<AppCacheGroup> group_; |
177 base::WeakPtrFactory<AppCacheURLRequestJob> weak_factory_; | 177 base::WeakPtrFactory<AppCacheURLRequestJob> weak_factory_; |
178 }; | 178 }; |
179 | 179 |
180 } // namespace appcache | 180 } // namespace content |
181 | 181 |
182 #endif // WEBKIT_BROWSER_APPCACHE_APPCACHE_REQUEST_HANDLER_H_ | 182 #endif // CONTENT_BROWSER_APPCACHE_APPCACHE_REQUEST_HANDLER_H_ |
OLD | NEW |