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

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

Issue 8018: Clean up filter and content encoding handling ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years, 1 month 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
« no previous file with comments | « net/url_request/url_request_http_job.cc ('k') | net/url_request/url_request_job.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 return false; 107 return false;
108 } 108 }
109 109
110 // Returns the HTTP response code for the request. 110 // Returns the HTTP response code for the request.
111 virtual int GetResponseCode() { return -1; } 111 virtual int GetResponseCode() { return -1; }
112 112
113 // Called to fetch the encoding types for this request. Only makes sense for 113 // Called to fetch the encoding types for this request. Only makes sense for
114 // some types of requests. Returns true on success. Calling this on a request 114 // some types of requests. Returns true on success. Calling this on a request
115 // that doesn't have or specify an encoding type will return false. 115 // that doesn't have or specify an encoding type will return false.
116 // Returns a array of strings showing the sequential encodings used on the 116 // Returns a array of strings showing the sequential encodings used on the
117 // content. For example, types[0] = "sdch" and types[1] = gzip, means the 117 // content.
118 // content was first encoded by sdch, and then encoded by gzip. To decode, 118 // For example, encoding_types[0] = FILTER_TYPE_SDCH and encoding_types[1] =
119 // a series of filters must be applied in the reverse order (in the above 119 // FILTER_TYPE_GZIP, means the content was first encoded by sdch, and then
120 // example, ungzip first, and then sdch expand). 120 // result was encoded by gzip. To decode, a series of filters must be applied
121 // TODO(jar): Cleaner API would return an array of enums. 121 // in the reverse order (in the above example, ungzip first, and then sdch
122 virtual bool GetContentEncodings(std::vector<std::string>* encoding_types) { 122 // expand).
123 virtual bool GetContentEncodings(
124 std::vector<Filter::FilterType>* encoding_types) {
123 return false; 125 return false;
124 } 126 }
125 127
126 // Find out if this is a response to a request that advertised an SDCH 128 // Find out if this is a response to a request that advertised an SDCH
127 // dictionary. Only makes sense for some types of requests. 129 // dictionary. Only makes sense for some types of requests.
128 virtual bool IsSdchResponse() const { return false; } 130 virtual bool IsSdchResponse() const { return false; }
129 131
130 // Called to setup stream filter for this request. An example of filter is 132 // Called to setup stream filter for this request. An example of filter is
131 // content encoding/decoding. 133 // content encoding/decoding.
132 void SetupFilter(); 134 void SetupFilter();
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 bool has_handled_response_; 305 bool has_handled_response_;
304 306
305 // Expected content size 307 // Expected content size
306 int64 expected_content_size_; 308 int64 expected_content_size_;
307 309
308 DISALLOW_COPY_AND_ASSIGN(URLRequestJob); 310 DISALLOW_COPY_AND_ASSIGN(URLRequestJob);
309 }; 311 };
310 312
311 #endif // NET_URL_REQUEST_URL_REQUEST_JOB_H_ 313 #endif // NET_URL_REQUEST_URL_REQUEST_JOB_H_
312 314
OLDNEW
« no previous file with comments | « net/url_request/url_request_http_job.cc ('k') | net/url_request/url_request_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698