OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 <vector> | 5 #include <vector> |
6 | 6 |
7 #include "webkit/appcache/appcache_url_request_job.h" | 7 #include "webkit/appcache/appcache_url_request_job.h" |
8 | 8 |
9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
11 #include "base/stringprintf.h" | 11 #include "base/stringprintf.h" |
12 #include "net/base/net_errors.h" | 12 #include "net/base/net_errors.h" |
13 #include "net/base/net_log.h" | 13 #include "net/base/net_log.h" |
14 #include "net/http/http_request_headers.h" | 14 #include "net/http/http_request_headers.h" |
15 #include "net/http/http_response_headers.h" | 15 #include "net/http/http_response_headers.h" |
16 #include "net/http/http_util.h" | 16 #include "net/http/http_util.h" |
17 #include "net/url_request/url_request.h" | 17 #include "net/url_request/url_request.h" |
18 #include "net/url_request/url_request_status.h" | 18 #include "net/url_request/url_request_status.h" |
19 | 19 |
20 namespace appcache { | 20 namespace appcache { |
21 | 21 |
22 AppCacheURLRequestJob::AppCacheURLRequestJob( | 22 AppCacheURLRequestJob::AppCacheURLRequestJob( |
23 URLRequest* request, AppCacheStorage* storage) | 23 net::URLRequest* request, AppCacheStorage* storage) |
24 : URLRequestJob(request), storage_(storage), | 24 : URLRequestJob(request), storage_(storage), |
25 has_been_started_(false), has_been_killed_(false), | 25 has_been_started_(false), has_been_killed_(false), |
26 delivery_type_(AWAITING_DELIVERY_ORDERS), | 26 delivery_type_(AWAITING_DELIVERY_ORDERS), |
27 cache_id_(kNoCacheId), is_fallback_(false), | 27 cache_id_(kNoCacheId), is_fallback_(false), |
28 cache_entry_not_found_(false), | 28 cache_entry_not_found_(false), |
29 ALLOW_THIS_IN_INITIALIZER_LIST(read_callback_( | 29 ALLOW_THIS_IN_INITIALIZER_LIST(read_callback_( |
30 this, &AppCacheURLRequestJob::OnReadComplete)) { | 30 this, &AppCacheURLRequestJob::OnReadComplete)) { |
31 DCHECK(storage_); | 31 DCHECK(storage_); |
32 } | 32 } |
33 | 33 |
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
272 } | 272 } |
273 | 273 |
274 // If multiple ranges are requested, we play dumb and | 274 // If multiple ranges are requested, we play dumb and |
275 // return the entire response with 200 OK. | 275 // return the entire response with 200 OK. |
276 if (ranges.size() == 1U) | 276 if (ranges.size() == 1U) |
277 range_requested_ = ranges[0]; | 277 range_requested_ = ranges[0]; |
278 } | 278 } |
279 | 279 |
280 } // namespace appcache | 280 } // namespace appcache |
281 | 281 |
OLD | NEW |