Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(97)

Side by Side Diff: chrome/browser/android/offline_pages/offline_page_request_job.cc

Issue 2786583002: chromeos: Check both original and absolute paths for file: scheme (Closed)
Patch Set: absolute_path -> original_path Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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;
jianli 2017/05/26 18:52:52 Though it is not relevant, will returning false be
mmenke 2017/05/26 19:00:04 Wouldn't that break this class entirely? This sub
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
OLDNEW
« no previous file with comments | « chrome/browser/android/offline_pages/offline_page_request_job.h ('k') | chrome/browser/net/chrome_network_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698