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

Side by Side Diff: webkit/child/resource_loader_bridge.h

Issue 23696002: Propagate the encoded data length through OnDownloadData delegate method (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 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 (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 // The intent of this file is to provide a type-neutral abstraction between 5 // The intent of this file is to provide a type-neutral abstraction between
6 // Chrome and WebKit for resource loading. This pure-virtual interface is 6 // Chrome and WebKit for resource loading. This pure-virtual interface is
7 // implemented by the embedder. 7 // implemented by the embedder.
8 // 8 //
9 // One of these objects will be created by WebKit for each request. WebKit 9 // One of these objects will be created by WebKit for each request. WebKit
10 // will own the pointer to the bridge, and will delete it when the request is 10 // will own the pointer to the bridge, and will delete it when the request is
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 bool* has_new_first_party_for_cookies, 145 bool* has_new_first_party_for_cookies,
146 GURL* new_first_party_for_cookies) = 0; 146 GURL* new_first_party_for_cookies) = 0;
147 147
148 // Called when response headers are available (after all redirects have 148 // Called when response headers are available (after all redirects have
149 // been followed). 149 // been followed).
150 virtual void OnReceivedResponse(const ResourceResponseInfo& info) = 0; 150 virtual void OnReceivedResponse(const ResourceResponseInfo& info) = 0;
151 151
152 // Called when a chunk of response data is downloaded. This method may be 152 // Called when a chunk of response data is downloaded. This method may be
153 // called multiple times or not at all if an error occurs. This method is 153 // called multiple times or not at all if an error occurs. This method is
154 // only called if RequestInfo::download_to_file was set to true, and in 154 // only called if RequestInfo::download_to_file was set to true, and in
155 // that case, OnReceivedData will not be called. 155 // that case, OnReceivedData will not be called.
Nico 2013/08/31 20:49:47 Document encoded_data_length here.
yusukesuzuki 2013/09/02 02:05:10 Done.
156 virtual void OnDownloadedData(int len) = 0; 156 virtual void OnDownloadedData(int len, int encoded_data_length) = 0;
157 157
158 // Called when a chunk of response data is available. This method may 158 // Called when a chunk of response data is available. This method may
159 // be called multiple times or not at all if an error occurs. 159 // be called multiple times or not at all if an error occurs.
160 // The encoded_data_length is the length of the encoded data transferred 160 // The encoded_data_length is the length of the encoded data transferred
161 // over the network, which could be different from data length (e.g. for 161 // over the network, which could be different from data length (e.g. for
162 // gzipped content), or -1 if if unknown. 162 // gzipped content), or -1 if if unknown.
163 virtual void OnReceivedData(const char* data, 163 virtual void OnReceivedData(const char* data,
164 int data_length, 164 int data_length,
165 int encoded_data_length) = 0; 165 int encoded_data_length) = 0;
166 166
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 // methods may be called to construct the body of the request. 223 // methods may be called to construct the body of the request.
224 WEBKIT_CHILD_EXPORT ResourceLoaderBridge(); 224 WEBKIT_CHILD_EXPORT ResourceLoaderBridge();
225 225
226 private: 226 private:
227 DISALLOW_COPY_AND_ASSIGN(ResourceLoaderBridge); 227 DISALLOW_COPY_AND_ASSIGN(ResourceLoaderBridge);
228 }; 228 };
229 229
230 } // namespace webkit_glue 230 } // namespace webkit_glue
231 231
232 #endif // WEBKIT_CHILD_RESOURCE_LOADER_BRIDGE_H_ 232 #endif // WEBKIT_CHILD_RESOURCE_LOADER_BRIDGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698