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

Side by Side Diff: ios/chrome/browser/net/ios_chrome_network_delegate.cc

Issue 2786583002: chromeos: Check both original and absolute paths for file: scheme (Closed)
Patch Set: remove dcheck Created 3 years, 6 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "ios/chrome/browser/net/ios_chrome_network_delegate.h" 5 #include "ios/chrome/browser/net/ios_chrome_network_delegate.h"
6 6
7 #include <stdlib.h> 7 #include <stdlib.h>
8 8
9 #include "base/base_paths.h" 9 #include "base/base_paths.h"
10 #include "base/debug/alias.h" 10 #include "base/debug/alias.h"
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 // Null during tests, or when we're running in the system context. 139 // Null during tests, or when we're running in the system context.
140 if (!cookie_settings_) 140 if (!cookie_settings_)
141 return true; 141 return true;
142 142
143 return cookie_settings_->IsCookieAccessAllowed( 143 return cookie_settings_->IsCookieAccessAllowed(
144 request.url(), request.first_party_for_cookies()); 144 request.url(), request.first_party_for_cookies());
145 } 145 }
146 146
147 bool IOSChromeNetworkDelegate::OnCanAccessFile( 147 bool IOSChromeNetworkDelegate::OnCanAccessFile(
148 const net::URLRequest& request, 148 const net::URLRequest& request,
149 const base::FilePath& path) const { 149 const base::FilePath& original_path,
150 const base::FilePath& absolute_path) const {
150 return true; 151 return true;
151 } 152 }
152 153
153 bool IOSChromeNetworkDelegate::OnCanEnablePrivacyMode( 154 bool IOSChromeNetworkDelegate::OnCanEnablePrivacyMode(
154 const GURL& url, 155 const GURL& url,
155 const GURL& first_party_for_cookies) const { 156 const GURL& first_party_for_cookies) const {
156 // Null during tests, or when we're running in the system context. 157 // Null during tests, or when we're running in the system context.
157 if (!cookie_settings_.get()) 158 if (!cookie_settings_.get())
158 return false; 159 return false;
159 160
160 return !cookie_settings_->IsCookieAccessAllowed(url, first_party_for_cookies); 161 return !cookie_settings_->IsCookieAccessAllowed(url, first_party_for_cookies);
161 } 162 }
162 163
163 bool IOSChromeNetworkDelegate:: 164 bool IOSChromeNetworkDelegate::
164 OnCancelURLRequestWithPolicyViolatingReferrerHeader( 165 OnCancelURLRequestWithPolicyViolatingReferrerHeader(
165 const net::URLRequest& request, 166 const net::URLRequest& request,
166 const GURL& target_url, 167 const GURL& target_url,
167 const GURL& referrer_url) const { 168 const GURL& referrer_url) const {
168 ReportInvalidReferrerSend(target_url, referrer_url); 169 ReportInvalidReferrerSend(target_url, referrer_url);
169 return true; 170 return true;
170 } 171 }
OLDNEW
« no previous file with comments | « ios/chrome/browser/net/ios_chrome_network_delegate.h ('k') | ios/web/shell/shell_network_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698