OLD | NEW |
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 Loading... |
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 } |
OLD | NEW |