| 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 "net/base/load_flags.h" | 9 #include "net/base/load_flags.h" |
| 10 #include "net/base/net_errors.h" | 10 #include "net/base/net_errors.h" |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 | 169 |
| 170 NetworkDelegate::AuthRequiredResponse NetworkDelegate::NotifyAuthRequired( | 170 NetworkDelegate::AuthRequiredResponse NetworkDelegate::NotifyAuthRequired( |
| 171 URLRequest* request, | 171 URLRequest* request, |
| 172 const AuthChallengeInfo& auth_info, | 172 const AuthChallengeInfo& auth_info, |
| 173 const AuthCallback& callback, | 173 const AuthCallback& callback, |
| 174 AuthCredentials* credentials) { | 174 AuthCredentials* credentials) { |
| 175 DCHECK(CalledOnValidThread()); | 175 DCHECK(CalledOnValidThread()); |
| 176 return OnAuthRequired(request, auth_info, callback, credentials); | 176 return OnAuthRequired(request, auth_info, callback, credentials); |
| 177 } | 177 } |
| 178 | 178 |
| 179 int NetworkDelegate::NotifyBeforeSocketStreamConnect( | |
| 180 SocketStream* socket, | |
| 181 const CompletionCallback& callback) { | |
| 182 DCHECK(CalledOnValidThread()); | |
| 183 DCHECK(socket); | |
| 184 DCHECK(!callback.is_null()); | |
| 185 // TODO(vadimt): Remove ScopedTracker below once crbug.com/423948 is fixed. | |
| 186 tracked_objects::ScopedTracker tracking_profile( | |
| 187 FROM_HERE_WITH_EXPLICIT_FUNCTION( | |
| 188 "423948 NetworkDelegate::OnBeforeSocketStreamConnect")); | |
| 189 return OnBeforeSocketStreamConnect(socket, callback); | |
| 190 } | |
| 191 | |
| 192 bool NetworkDelegate::CanGetCookies(const URLRequest& request, | 179 bool NetworkDelegate::CanGetCookies(const URLRequest& request, |
| 193 const CookieList& cookie_list) { | 180 const CookieList& cookie_list) { |
| 194 DCHECK(CalledOnValidThread()); | 181 DCHECK(CalledOnValidThread()); |
| 195 DCHECK(!(request.load_flags() & net::LOAD_DO_NOT_SEND_COOKIES)); | 182 DCHECK(!(request.load_flags() & net::LOAD_DO_NOT_SEND_COOKIES)); |
| 196 // TODO(vadimt): Remove ScopedTracker below once crbug.com/423948 is fixed. | 183 // TODO(vadimt): Remove ScopedTracker below once crbug.com/423948 is fixed. |
| 197 tracked_objects::ScopedTracker tracking_profile( | 184 tracked_objects::ScopedTracker tracking_profile( |
| 198 FROM_HERE_WITH_EXPLICIT_FUNCTION( | 185 FROM_HERE_WITH_EXPLICIT_FUNCTION( |
| 199 "423948 NetworkDelegate::OnCanGetCookies")); | 186 "423948 NetworkDelegate::OnCanGetCookies")); |
| 200 return OnCanGetCookies(request, cookie_list); | 187 return OnCanGetCookies(request, cookie_list); |
| 201 } | 188 } |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 359 } | 346 } |
| 360 | 347 |
| 361 bool NetworkDelegate::OnCancelURLRequestWithPolicyViolatingReferrerHeader( | 348 bool NetworkDelegate::OnCancelURLRequestWithPolicyViolatingReferrerHeader( |
| 362 const URLRequest& request, | 349 const URLRequest& request, |
| 363 const GURL& target_url, | 350 const GURL& target_url, |
| 364 const GURL& referrer_url) const { | 351 const GURL& referrer_url) const { |
| 365 return false; | 352 return false; |
| 366 } | 353 } |
| 367 | 354 |
| 368 } // namespace net | 355 } // namespace net |
| OLD | NEW |