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

Side by Side Diff: net/base/network_delegate_impl.h

Issue 2786583002: chromeos: Check both original and absolute paths for file: scheme (Closed)
Patch Set: disable checks in sub classes Created 3 years, 8 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 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 #ifndef NET_BASE_NETWORK_DELEGATE_IMPL_H_ 5 #ifndef NET_BASE_NETWORK_DELEGATE_IMPL_H_
6 #define NET_BASE_NETWORK_DELEGATE_IMPL_H_ 6 #define NET_BASE_NETWORK_DELEGATE_IMPL_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/strings/string16.h" 10 #include "base/strings/string16.h"
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 const CookieList& cookie_list) override; 175 const CookieList& cookie_list) override;
176 176
177 // Called when a cookie is set to allow the network delegate to block access 177 // Called when a cookie is set to allow the network delegate to block access
178 // to the cookie. This method will never be invoked when 178 // to the cookie. This method will never be invoked when
179 // LOAD_DO_NOT_SAVE_COOKIES is specified. 179 // LOAD_DO_NOT_SAVE_COOKIES is specified.
180 bool OnCanSetCookie(const URLRequest& request, 180 bool OnCanSetCookie(const URLRequest& request,
181 const std::string& cookie_line, 181 const std::string& cookie_line,
182 CookieOptions* options) override; 182 CookieOptions* options) override;
183 183
184 // Called when a file access is attempted to allow the network delegate to 184 // Called when a file access is attempted to allow the network delegate to
185 // allow or block access to the given file path. Returns true if access is 185 // allow or block access to the given file path, provided in the original
186 // allowed. 186 // and absolute forms (i.e. symbolic link is resolved). It's up to the sub
187 // class to decide which path to use for checking. Returns true if access
188 // is allowed.
mmenke 2017/04/18 17:24:45 same comment as in other file... Or better, just
satorux1 2017/04/21 08:05:37 Let me do it in a separate patch.
187 bool OnCanAccessFile(const URLRequest& request, 189 bool OnCanAccessFile(const URLRequest& request,
188 const base::FilePath& path) const override; 190 const base::FilePath& original_path,
191 const base::FilePath& absolute_path) const override;
189 192
190 // Returns true if the given |url| has to be requested over connection that 193 // Returns true if the given |url| has to be requested over connection that
191 // is not tracked by the server. Usually is false, unless user privacy 194 // is not tracked by the server. Usually is false, unless user privacy
192 // settings block cookies from being get or set. 195 // settings block cookies from being get or set.
193 bool OnCanEnablePrivacyMode( 196 bool OnCanEnablePrivacyMode(
194 const GURL& url, 197 const GURL& url,
195 const GURL& first_party_for_cookies) const override; 198 const GURL& first_party_for_cookies) const override;
196 199
197 // Returns true if the embedder has enabled experimental cookie features. 200 // Returns true if the embedder has enabled experimental cookie features.
198 bool OnAreExperimentalCookieFeaturesEnabled() const override; 201 bool OnAreExperimentalCookieFeaturesEnabled() const override;
199 202
200 // Called when the |referrer_url| for requesting |target_url| during handling 203 // Called when the |referrer_url| for requesting |target_url| during handling
201 // of the |request| is does not comply with the referrer policy (e.g. a 204 // of the |request| is does not comply with the referrer policy (e.g. a
202 // secure referrer for an insecure initial target). 205 // secure referrer for an insecure initial target).
203 // Returns true if the request should be cancelled. Otherwise, the referrer 206 // Returns true if the request should be cancelled. Otherwise, the referrer
204 // header is stripped from the request. 207 // header is stripped from the request.
205 bool OnCancelURLRequestWithPolicyViolatingReferrerHeader( 208 bool OnCancelURLRequestWithPolicyViolatingReferrerHeader(
206 const URLRequest& request, 209 const URLRequest& request,
207 const GURL& target_url, 210 const GURL& target_url,
208 const GURL& referrer_url) const override; 211 const GURL& referrer_url) const override;
209 }; 212 };
210 213
211 } // namespace net 214 } // namespace net
212 215
213 #endif // NET_BASE_NETWORK_DELEGATE_IMPL_H_ 216 #endif // NET_BASE_NETWORK_DELEGATE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698