| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "chrome/browser/android/offline_pages/offline_page_request_job.h" | 5 #include "chrome/browser/android/offline_pages/offline_page_request_job.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| (...skipping 689 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 700 redirected_url.spec().c_str()); | 700 redirected_url.spec().c_str()); |
| 701 | 701 |
| 702 fake_headers_for_redirect_ = new net::HttpResponseHeaders( | 702 fake_headers_for_redirect_ = new net::HttpResponseHeaders( |
| 703 net::HttpUtil::AssembleRawHeaders(header_string.c_str(), | 703 net::HttpUtil::AssembleRawHeaders(header_string.c_str(), |
| 704 header_string.length())); | 704 header_string.length())); |
| 705 DCHECK(fake_headers_for_redirect_->IsRedirect(nullptr)); | 705 DCHECK(fake_headers_for_redirect_->IsRedirect(nullptr)); |
| 706 | 706 |
| 707 URLRequestJob::NotifyHeadersComplete(); | 707 URLRequestJob::NotifyHeadersComplete(); |
| 708 } | 708 } |
| 709 | 709 |
| 710 // Returns true to disable the file path checking for file: scheme in |
| 711 // URLRequestFileJob, that's not relevant for this class. |
| 712 bool OfflinePageRequestJob::CanAccessFile(const base::FilePath& original_path, |
| 713 const base::FilePath& absolute_path) { |
| 714 return true; |
| 715 } |
| 716 |
| 710 void OfflinePageRequestJob::SetDelegateForTesting( | 717 void OfflinePageRequestJob::SetDelegateForTesting( |
| 711 std::unique_ptr<Delegate> delegate) { | 718 std::unique_ptr<Delegate> delegate) { |
| 712 delegate_ = std::move(delegate); | 719 delegate_ = std::move(delegate); |
| 713 } | 720 } |
| 714 | 721 |
| 715 } // namespace offline_pages | 722 } // namespace offline_pages |
| OLD | NEW |