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 "content/browser/appcache/appcache_url_request_job.h" | 5 #include "content/browser/appcache/appcache_url_request_job.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 manifest_url_, group_id_, entry_.response_id(), this); | 127 manifest_url_, group_id_, entry_.response_id(), this); |
128 break; | 128 break; |
129 | 129 |
130 default: | 130 default: |
131 NOTREACHED(); | 131 NOTREACHED(); |
132 break; | 132 break; |
133 } | 133 } |
134 } | 134 } |
135 | 135 |
136 void AppCacheURLRequestJob::BeginExecutableHandlerDelivery() { | 136 void AppCacheURLRequestJob::BeginExecutableHandlerDelivery() { |
137 DCHECK(CommandLine::ForCurrentProcess()-> | 137 DCHECK(base::CommandLine::ForCurrentProcess()->HasSwitch( |
138 HasSwitch(kEnableExecutableHandlers)); | 138 kEnableExecutableHandlers)); |
139 if (!storage_->service()->handler_factory()) { | 139 if (!storage_->service()->handler_factory()) { |
140 BeginErrorDelivery("missing handler factory"); | 140 BeginErrorDelivery("missing handler factory"); |
141 return; | 141 return; |
142 } | 142 } |
143 | 143 |
144 request()->net_log().AddEvent( | 144 request()->net_log().AddEvent( |
145 net::NetLog::TYPE_APPCACHE_DELIVERING_EXECUTABLE_RESPONSE); | 145 net::NetLog::TYPE_APPCACHE_DELIVERING_EXECUTABLE_RESPONSE); |
146 | 146 |
147 // We defer job delivery until the executable handler is spun up and | 147 // We defer job delivery until the executable handler is spun up and |
148 // provides a response. The sequence goes like this... | 148 // provides a response. The sequence goes like this... |
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
440 return; | 440 return; |
441 } | 441 } |
442 | 442 |
443 // If multiple ranges are requested, we play dumb and | 443 // If multiple ranges are requested, we play dumb and |
444 // return the entire response with 200 OK. | 444 // return the entire response with 200 OK. |
445 if (ranges.size() == 1U) | 445 if (ranges.size() == 1U) |
446 range_requested_ = ranges[0]; | 446 range_requested_ = ranges[0]; |
447 } | 447 } |
448 | 448 |
449 } // namespace content | 449 } // namespace content |
OLD | NEW |