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

Side by Side Diff: net/url_request/url_request_job.h

Issue 6516025: Remove GetInputStreamBufferSize() method from FilterContext. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed signed/unsigned error Created 9 years, 10 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #ifndef NET_URL_REQUEST_URL_REQUEST_JOB_H_ 5 #ifndef NET_URL_REQUEST_URL_REQUEST_JOB_H_
6 #define NET_URL_REQUEST_URL_REQUEST_JOB_H_ 6 #define NET_URL_REQUEST_URL_REQUEST_JOB_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 // FilterContext methods: 199 // FilterContext methods:
200 // These methods are not applicable to all connections. 200 // These methods are not applicable to all connections.
201 virtual bool GetMimeType(std::string* mime_type) const; 201 virtual bool GetMimeType(std::string* mime_type) const;
202 virtual bool GetURL(GURL* gurl) const; 202 virtual bool GetURL(GURL* gurl) const;
203 virtual base::Time GetRequestTime() const; 203 virtual base::Time GetRequestTime() const;
204 virtual bool IsDownload() const; 204 virtual bool IsDownload() const;
205 virtual bool IsSdchResponse() const; 205 virtual bool IsSdchResponse() const;
206 virtual bool IsCachedContent() const; 206 virtual bool IsCachedContent() const;
207 virtual int64 GetByteReadCount() const; 207 virtual int64 GetByteReadCount() const;
208 virtual int GetResponseCode() const; 208 virtual int GetResponseCode() const;
209 virtual int GetInputStreamBufferSize() const;
210 virtual void RecordPacketStats(StatisticSelector statistic) const; 209 virtual void RecordPacketStats(StatisticSelector statistic) const;
211 210
212 protected: 211 protected:
213 friend class base::RefCounted<URLRequestJob>; 212 friend class base::RefCounted<URLRequestJob>;
214 virtual ~URLRequestJob(); 213 virtual ~URLRequestJob();
215 214
216 // Notifies the job that headers have been received. 215 // Notifies the job that headers have been received.
217 void NotifyHeadersComplete(); 216 void NotifyHeadersComplete();
218 217
219 // Notifies the request that the job has completed a Read operation. 218 // Notifies the request that the job has completed a Read operation.
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 int prefilter_bytes_read_; 291 int prefilter_bytes_read_;
293 // The number of bytes read after passing through the filter. 292 // The number of bytes read after passing through the filter.
294 int postfilter_bytes_read_; 293 int postfilter_bytes_read_;
295 // True when (we believe) the content in this net::URLRequest was 294 // True when (we believe) the content in this net::URLRequest was
296 // compressible. 295 // compressible.
297 bool is_compressible_content_; 296 bool is_compressible_content_;
298 // True when the content in this net::URLRequest was compressed. 297 // True when the content in this net::URLRequest was compressed.
299 bool is_compressed_; 298 bool is_compressed_;
300 299
301 private: 300 private:
302 // Size of filter input buffers used by this class.
303 static const int kFilterBufSize;
304
305 // When data filtering is enabled, this function is used to read data 301 // When data filtering is enabled, this function is used to read data
306 // for the filter. Returns true if raw data was read. Returns false if 302 // for the filter. Returns true if raw data was read. Returns false if
307 // an error occurred (or we are waiting for IO to complete). 303 // an error occurred (or we are waiting for IO to complete).
308 bool ReadRawDataForFilter(int *bytes_read); 304 bool ReadRawDataForFilter(int *bytes_read);
309 305
310 // Invokes ReadRawData and records bytes read if the read completes 306 // Invokes ReadRawData and records bytes read if the read completes
311 // synchronously. 307 // synchronously.
312 bool ReadRawDataHelper(net::IOBuffer* buf, int buf_size, int* bytes_read); 308 bool ReadRawDataHelper(net::IOBuffer* buf, int buf_size, int* bytes_read);
313 309
314 // Called in response to a redirect that was not canceled to follow the 310 // Called in response to a redirect that was not canceled to follow the
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 // The count of the number of packets, some of which may not have been timed. 409 // The count of the number of packets, some of which may not have been timed.
414 // We're ignoring overflow, as 1430 x 2^31 is a LOT of bytes. 410 // We're ignoring overflow, as 1430 x 2^31 is a LOT of bytes.
415 int observed_packet_count_; 411 int observed_packet_count_;
416 412
417 DISALLOW_COPY_AND_ASSIGN(URLRequestJob); 413 DISALLOW_COPY_AND_ASSIGN(URLRequestJob);
418 }; 414 };
419 415
420 } // namespace net 416 } // namespace net
421 417
422 #endif // NET_URL_REQUEST_URL_REQUEST_JOB_H_ 418 #endif // NET_URL_REQUEST_URL_REQUEST_JOB_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698