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 CONTENT_BROWSER_APPCACHE_APPCACHE_URL_REQUEST_JOB_H_ | 5 #ifndef CONTENT_BROWSER_APPCACHE_APPCACHE_URL_REQUEST_JOB_H_ |
6 #define CONTENT_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" | 11 #include "content/browser/appcache/appcache_entry.h" |
12 #include "content/browser/appcache/appcache_executable_handler.h" | 12 #include "content/browser/appcache/appcache_executable_handler.h" |
13 #include "content/browser/appcache/appcache_response.h" | 13 #include "content/browser/appcache/appcache_response.h" |
14 #include "content/browser/appcache/appcache_storage.h" | 14 #include "content/browser/appcache/appcache_storage.h" |
15 #include "content/common/content_export.h" | 15 #include "content/common/content_export.h" |
16 #include "net/http/http_byte_range.h" | 16 #include "net/http/http_byte_range.h" |
17 #include "net/url_request/url_request_job.h" | 17 #include "net/url_request/url_request_job.h" |
18 | 18 |
19 namespace content { | |
20 class AppCacheRequestHandlerTest; | |
21 class AppCacheURLRequestJobTest; | |
22 } | |
23 | |
24 namespace net { | 19 namespace net { |
25 class GrowableIOBuffer; | 20 class GrowableIOBuffer; |
26 }; | 21 }; |
27 | 22 |
28 namespace content { | 23 namespace content { |
29 | |
30 class AppCacheHost; | 24 class AppCacheHost; |
| 25 class AppCacheRequestHandlerTest; |
| 26 class AppCacheURLRequestJobTest; |
31 | 27 |
32 // A net::URLRequestJob derivative that knows how to return a response stored | 28 // A net::URLRequestJob derivative that knows how to return a response stored |
33 // in the appcache. | 29 // in the appcache. |
34 class CONTENT_EXPORT AppCacheURLRequestJob | 30 class CONTENT_EXPORT AppCacheURLRequestJob |
35 : public net::URLRequestJob, | 31 : public net::URLRequestJob, |
36 public AppCacheStorage::Delegate { | 32 public AppCacheStorage::Delegate { |
37 public: | 33 public: |
38 AppCacheURLRequestJob(net::URLRequest* request, | 34 AppCacheURLRequestJob(net::URLRequest* request, |
39 net::NetworkDelegate* network_delegate, | 35 net::NetworkDelegate* network_delegate, |
40 AppCacheStorage* storage, | 36 AppCacheStorage* storage, |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 scoped_ptr<net::HttpResponseInfo> range_response_info_; | 169 scoped_ptr<net::HttpResponseInfo> range_response_info_; |
174 scoped_ptr<AppCacheResponseReader> reader_; | 170 scoped_ptr<AppCacheResponseReader> reader_; |
175 scoped_refptr<AppCache> cache_; | 171 scoped_refptr<AppCache> cache_; |
176 scoped_refptr<AppCacheGroup> group_; | 172 scoped_refptr<AppCacheGroup> group_; |
177 base::WeakPtrFactory<AppCacheURLRequestJob> weak_factory_; | 173 base::WeakPtrFactory<AppCacheURLRequestJob> weak_factory_; |
178 }; | 174 }; |
179 | 175 |
180 } // namespace content | 176 } // namespace content |
181 | 177 |
182 #endif // CONTENT_BROWSER_APPCACHE_APPCACHE_REQUEST_HANDLER_H_ | 178 #endif // CONTENT_BROWSER_APPCACHE_APPCACHE_REQUEST_HANDLER_H_ |
OLD | NEW |