| 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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 override_response_headers, | 82 override_response_headers, |
| 83 allowed_unsafe_redirect_url); | 83 allowed_unsafe_redirect_url); |
| 84 } | 84 } |
| 85 | 85 |
| 86 void NetworkDelegate::NotifyResponseStarted(URLRequest* request) { | 86 void NetworkDelegate::NotifyResponseStarted(URLRequest* request) { |
| 87 DCHECK(CalledOnValidThread()); | 87 DCHECK(CalledOnValidThread()); |
| 88 DCHECK(request); | 88 DCHECK(request); |
| 89 OnResponseStarted(request); | 89 OnResponseStarted(request); |
| 90 } | 90 } |
| 91 | 91 |
| 92 void NetworkDelegate::NotifyNetworkBytesReceived(const URLRequest& request, | 92 void NetworkDelegate::NotifyNetworkBytesReceived(URLRequest* request, |
| 93 int64_t bytes_received) { | 93 int64_t bytes_received) { |
| 94 DCHECK(CalledOnValidThread()); | 94 DCHECK(CalledOnValidThread()); |
| 95 DCHECK_GT(bytes_received, 0); | 95 DCHECK_GT(bytes_received, 0); |
| 96 OnNetworkBytesReceived(request, bytes_received); | 96 OnNetworkBytesReceived(request, bytes_received); |
| 97 } | 97 } |
| 98 | 98 |
| 99 void NetworkDelegate::NotifyNetworkBytesSent(const URLRequest& request, | 99 void NetworkDelegate::NotifyNetworkBytesSent(URLRequest* request, |
| 100 int64_t bytes_sent) { | 100 int64_t bytes_sent) { |
| 101 DCHECK(CalledOnValidThread()); | 101 DCHECK(CalledOnValidThread()); |
| 102 DCHECK_GT(bytes_sent, 0); | 102 DCHECK_GT(bytes_sent, 0); |
| 103 OnNetworkBytesSent(request, bytes_sent); | 103 OnNetworkBytesSent(request, bytes_sent); |
| 104 } | 104 } |
| 105 | 105 |
| 106 void NetworkDelegate::NotifyBeforeRedirect(URLRequest* request, | 106 void NetworkDelegate::NotifyBeforeRedirect(URLRequest* request, |
| 107 const GURL& new_location) { | 107 const GURL& new_location) { |
| 108 DCHECK(CalledOnValidThread()); | 108 DCHECK(CalledOnValidThread()); |
| 109 DCHECK(request); | 109 DCHECK(request); |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 bool NetworkDelegate::CancelURLRequestWithPolicyViolatingReferrerHeader( | 181 bool NetworkDelegate::CancelURLRequestWithPolicyViolatingReferrerHeader( |
| 182 const URLRequest& request, | 182 const URLRequest& request, |
| 183 const GURL& target_url, | 183 const GURL& target_url, |
| 184 const GURL& referrer_url) const { | 184 const GURL& referrer_url) const { |
| 185 DCHECK(CalledOnValidThread()); | 185 DCHECK(CalledOnValidThread()); |
| 186 return OnCancelURLRequestWithPolicyViolatingReferrerHeader( | 186 return OnCancelURLRequestWithPolicyViolatingReferrerHeader( |
| 187 request, target_url, referrer_url); | 187 request, target_url, referrer_url); |
| 188 } | 188 } |
| 189 | 189 |
| 190 } // namespace net | 190 } // namespace net |
| OLD | NEW |