OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "extensions/browser/extension_protocols.h" | 5 #include "extensions/browser/extension_protocols.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 directory_path_, | 207 directory_path_, |
208 base::Unretained(read_file_path), | 208 base::Unretained(read_file_path), |
209 base::Unretained(last_modified_time)), | 209 base::Unretained(last_modified_time)), |
210 base::Bind(&URLRequestExtensionJob::OnFilePathAndLastModifiedTimeRead, | 210 base::Bind(&URLRequestExtensionJob::OnFilePathAndLastModifiedTimeRead, |
211 weak_factory_.GetWeakPtr(), | 211 weak_factory_.GetWeakPtr(), |
212 base::Owned(read_file_path), | 212 base::Owned(read_file_path), |
213 base::Owned(last_modified_time))); | 213 base::Owned(last_modified_time))); |
214 DCHECK(posted); | 214 DCHECK(posted); |
215 } | 215 } |
216 | 216 |
| 217 virtual bool IsRedirectResponse(GURL* location, |
| 218 int* http_status_code) override { |
| 219 return false; |
| 220 } |
| 221 |
217 virtual void SetExtraRequestHeaders( | 222 virtual void SetExtraRequestHeaders( |
218 const net::HttpRequestHeaders& headers) OVERRIDE { | 223 const net::HttpRequestHeaders& headers) OVERRIDE { |
219 // TODO(asargent) - we'll need to add proper support for range headers. | 224 // TODO(asargent) - we'll need to add proper support for range headers. |
220 // crbug.com/369895. | 225 // crbug.com/369895. |
221 std::string range_header; | 226 std::string range_header; |
222 if (headers.GetHeader(net::HttpRequestHeaders::kRange, &range_header)) { | 227 if (headers.GetHeader(net::HttpRequestHeaders::kRange, &range_header)) { |
223 if (verify_job_.get()) | 228 if (verify_job_.get()) |
224 verify_job_ = NULL; | 229 verify_job_ = NULL; |
225 } | 230 } |
226 URLRequestFileJob::SetExtraRequestHeaders(headers); | 231 URLRequestFileJob::SetExtraRequestHeaders(headers); |
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
569 return new net::HttpResponseHeaders(raw_headers); | 574 return new net::HttpResponseHeaders(raw_headers); |
570 } | 575 } |
571 | 576 |
572 net::URLRequestJobFactory::ProtocolHandler* CreateExtensionProtocolHandler( | 577 net::URLRequestJobFactory::ProtocolHandler* CreateExtensionProtocolHandler( |
573 bool is_incognito, | 578 bool is_incognito, |
574 extensions::InfoMap* extension_info_map) { | 579 extensions::InfoMap* extension_info_map) { |
575 return new ExtensionProtocolHandler(is_incognito, extension_info_map); | 580 return new ExtensionProtocolHandler(is_incognito, extension_info_map); |
576 } | 581 } |
577 | 582 |
578 } // namespace extensions | 583 } // namespace extensions |
OLD | NEW |