| OLD | NEW |
| 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 Loading... |
| 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 24 matching lines...) Expand all Loading... |
| 199 int net_error) { | 200 int net_error) { |
| 200 OnCompleted(request, started); | 201 OnCompleted(request, started); |
| 201 } | 202 } |
| 202 | 203 |
| 203 // Deprecated. | 204 // Deprecated. |
| 204 void NetworkDelegate::OnCompleted(URLRequest* request, bool started) { | 205 void NetworkDelegate::OnCompleted(URLRequest* request, bool started) { |
| 205 NOTREACHED(); | 206 NOTREACHED(); |
| 206 } | 207 } |
| 207 | 208 |
| 208 } // namespace net | 209 } // namespace net |
| OLD | NEW |