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

Side by Side Diff: net/base/layered_network_delegate.cc

Issue 1362793003: Notify NetworkDelegate when bytes have been sent over the network. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Initial patch set Created 5 years, 3 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 #include "net/base/layered_network_delegate.h" 5 #include "net/base/layered_network_delegate.h"
6 6
7 namespace net { 7 namespace net {
8 8
9 LayeredNetworkDelegate::LayeredNetworkDelegate( 9 LayeredNetworkDelegate::LayeredNetworkDelegate(
10 scoped_ptr<NetworkDelegate> nested_network_delegate) 10 scoped_ptr<NetworkDelegate> nested_network_delegate)
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 const HttpRequestHeaders& headers) { 90 const HttpRequestHeaders& headers) {
91 OnSendHeadersInternal(request, headers); 91 OnSendHeadersInternal(request, headers);
92 nested_network_delegate_->NotifySendHeaders(request, headers); 92 nested_network_delegate_->NotifySendHeaders(request, headers);
93 } 93 }
94 94
95 void LayeredNetworkDelegate::OnSendHeadersInternal( 95 void LayeredNetworkDelegate::OnSendHeadersInternal(
96 URLRequest* request, 96 URLRequest* request,
97 const HttpRequestHeaders& headers) { 97 const HttpRequestHeaders& headers) {
98 } 98 }
99 99
100 void LayeredNetworkDelegate::OnNetworkBytesSent(const URLRequest& request,
101 int64_t bytes_sent) {
102 OnNetworkBytesSentInternal(request, bytes_sent);
103 nested_network_delegate_->NotifyNetworkBytesSent(request, bytes_sent);
104 }
105
106 void LayeredNetworkDelegate::OnNetworkBytesSentInternal(
107 const URLRequest& request,
108 int64_t bytes_sent) {}
mmenke 2015/09/24 21:30:24 Order here should match header order
sclittle 2015/09/24 22:20:42 Done.
109
100 int LayeredNetworkDelegate::OnHeadersReceived( 110 int LayeredNetworkDelegate::OnHeadersReceived(
101 URLRequest* request, 111 URLRequest* request,
102 const CompletionCallback& callback, 112 const CompletionCallback& callback,
103 const HttpResponseHeaders* original_response_headers, 113 const HttpResponseHeaders* original_response_headers,
104 scoped_refptr<HttpResponseHeaders>* override_response_headers, 114 scoped_refptr<HttpResponseHeaders>* override_response_headers,
105 GURL* allowed_unsafe_redirect_url) { 115 GURL* allowed_unsafe_redirect_url) {
106 OnHeadersReceivedInternal(request, callback, original_response_headers, 116 OnHeadersReceivedInternal(request, callback, original_response_headers,
107 override_response_headers, 117 override_response_headers,
108 allowed_unsafe_redirect_url); 118 allowed_unsafe_redirect_url);
109 return nested_network_delegate_->NotifyHeadersReceived( 119 return nested_network_delegate_->NotifyHeadersReceived(
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 } 280 }
271 281
272 void LayeredNetworkDelegate:: 282 void LayeredNetworkDelegate::
273 OnCancelURLRequestWithPolicyViolatingReferrerHeaderInternal( 283 OnCancelURLRequestWithPolicyViolatingReferrerHeaderInternal(
274 const URLRequest& request, 284 const URLRequest& request,
275 const GURL& target_url, 285 const GURL& target_url,
276 const GURL& referrer_url) const { 286 const GURL& referrer_url) const {
277 } 287 }
278 288
279 } // namespace net 289 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698