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

Side by Side Diff: net/base/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
« no previous file with comments | « net/base/network_delegate.h ('k') | net/base/network_delegate_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "net/base/network_delegate.h" 5 #include "net/base/network_delegate.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/profiler/scoped_tracker.h" 8 #include "base/profiler/scoped_tracker.h"
9 #include "base/trace_event/trace_event.h" 9 #include "base/trace_event/trace_event.h"
10 #include "net/base/load_flags.h" 10 #include "net/base/load_flags.h"
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 152
153 bool NetworkDelegate::CanSetCookie(const URLRequest& request, 153 bool NetworkDelegate::CanSetCookie(const URLRequest& request,
154 const std::string& cookie_line, 154 const std::string& cookie_line,
155 CookieOptions* options) { 155 CookieOptions* options) {
156 DCHECK(CalledOnValidThread()); 156 DCHECK(CalledOnValidThread());
157 DCHECK(!(request.load_flags() & LOAD_DO_NOT_SAVE_COOKIES)); 157 DCHECK(!(request.load_flags() & LOAD_DO_NOT_SAVE_COOKIES));
158 return OnCanSetCookie(request, cookie_line, options); 158 return OnCanSetCookie(request, cookie_line, options);
159 } 159 }
160 160
161 bool NetworkDelegate::CanAccessFile(const URLRequest& request, 161 bool NetworkDelegate::CanAccessFile(const URLRequest& request,
162 const base::FilePath& path) const { 162 const base::FilePath& original_path,
163 const base::FilePath& absolute_path) const {
163 DCHECK(CalledOnValidThread()); 164 DCHECK(CalledOnValidThread());
164 return OnCanAccessFile(request, path); 165 return OnCanAccessFile(request, original_path, absolute_path);
165 } 166 }
166 167
167 bool NetworkDelegate::CanEnablePrivacyMode( 168 bool NetworkDelegate::CanEnablePrivacyMode(
168 const GURL& url, 169 const GURL& url,
169 const GURL& first_party_for_cookies) const { 170 const GURL& first_party_for_cookies) const {
170 TRACE_EVENT0(kNetTracingCategory, "NetworkDelegate::CanEnablePrivacyMode"); 171 TRACE_EVENT0(kNetTracingCategory, "NetworkDelegate::CanEnablePrivacyMode");
171 DCHECK(CalledOnValidThread()); 172 DCHECK(CalledOnValidThread());
172 return OnCanEnablePrivacyMode(url, first_party_for_cookies); 173 return OnCanEnablePrivacyMode(url, first_party_for_cookies);
173 } 174 }
174 175
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 int net_error) { 222 int net_error) {
222 OnCompleted(request, started); 223 OnCompleted(request, started);
223 } 224 }
224 225
225 // Deprecated. 226 // Deprecated.
226 void NetworkDelegate::OnCompleted(URLRequest* request, bool started) { 227 void NetworkDelegate::OnCompleted(URLRequest* request, bool started) {
227 NOTREACHED(); 228 NOTREACHED();
228 } 229 }
229 230
230 } // namespace net 231 } // namespace net
OLDNEW
« no previous file with comments | « net/base/network_delegate.h ('k') | net/base/network_delegate_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698