Chromium Code Reviews| 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 <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/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| 11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
| 12 #include "base/message_loop.h" | 12 #include "base/message_loop.h" |
| 13 #include "base/string_util.h" | 13 #include "base/string_util.h" |
| 14 #include "base/stringprintf.h" | 14 #include "base/stringprintf.h" |
| 15 #include "net/base/net_errors.h" | 15 #include "net/base/net_errors.h" |
| 16 #include "net/base/net_log.h" | 16 #include "net/base/net_log.h" |
| 17 #include "net/http/http_request_headers.h" | 17 #include "net/http/http_request_headers.h" |
| 18 #include "net/http/http_response_headers.h" | 18 #include "net/http/http_response_headers.h" |
| 19 #include "net/http/http_util.h" | 19 #include "net/http/http_util.h" |
| 20 #include "net/url_request/url_request.h" | 20 #include "net/url_request/url_request.h" |
|
mmenke
2012/08/21 15:28:49
Not needed?
shalev
2012/08/22 20:34:10
I think this is actually needed, eg. for line 95:
| |
| 21 #include "net/url_request/url_request_context.h" | |
| 22 #include "net/url_request/url_request_status.h" | 21 #include "net/url_request/url_request_status.h" |
| 23 #include "webkit/appcache/appcache_service.h" | 22 #include "webkit/appcache/appcache_service.h" |
| 24 | 23 |
| 25 namespace appcache { | 24 namespace appcache { |
| 26 | 25 |
| 27 AppCacheURLRequestJob::AppCacheURLRequestJob( | 26 AppCacheURLRequestJob::AppCacheURLRequestJob( |
| 28 net::URLRequest* request, AppCacheStorage* storage) | 27 net::URLRequest* request, |
| 29 : net::URLRequestJob(request, request->context()->network_delegate()), | 28 net::NetworkDelegate* network_delegate, |
| 29 AppCacheStorage* storage) | |
| 30 : net::URLRequestJob(request, network_delegate), | |
| 30 storage_(storage), | 31 storage_(storage), |
| 31 has_been_started_(false), has_been_killed_(false), | 32 has_been_started_(false), has_been_killed_(false), |
| 32 delivery_type_(AWAITING_DELIVERY_ORDERS), | 33 delivery_type_(AWAITING_DELIVERY_ORDERS), |
| 33 group_id_(0), cache_id_(kNoCacheId), is_fallback_(false), | 34 group_id_(0), cache_id_(kNoCacheId), is_fallback_(false), |
| 34 cache_entry_not_found_(false), | 35 cache_entry_not_found_(false), |
| 35 ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)) { | 36 ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)) { |
| 36 DCHECK(storage_); | 37 DCHECK(storage_); |
| 37 } | 38 } |
| 38 | 39 |
| 39 void AppCacheURLRequestJob::DeliverAppCachedResponse( | 40 void AppCacheURLRequestJob::DeliverAppCachedResponse( |
| (...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 285 return; | 286 return; |
| 286 } | 287 } |
| 287 | 288 |
| 288 // If multiple ranges are requested, we play dumb and | 289 // If multiple ranges are requested, we play dumb and |
| 289 // return the entire response with 200 OK. | 290 // return the entire response with 200 OK. |
| 290 if (ranges.size() == 1U) | 291 if (ranges.size() == 1U) |
| 291 range_requested_ = ranges[0]; | 292 range_requested_ = ranges[0]; |
| 292 } | 293 } |
| 293 | 294 |
| 294 } // namespace appcache | 295 } // namespace appcache |
| OLD | NEW |