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

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

Issue 6674042: Make URLRequestHttpJob the only URLRequestJob concerned with FilterContext. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Responded to comments from willchan Created 9 years, 9 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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 108
109 // Called to get response info. 109 // Called to get response info.
110 virtual void GetResponseInfo(net::HttpResponseInfo* info); 110 virtual void GetResponseInfo(net::HttpResponseInfo* info);
111 111
112 // Returns the cookie values included in the response, if applicable. 112 // Returns the cookie values included in the response, if applicable.
113 // Returns true if applicable. 113 // Returns true if applicable.
114 // NOTE: This removes the cookies from the job, so it will only return 114 // NOTE: This removes the cookies from the job, so it will only return
115 // useful results once per job. 115 // useful results once per job.
116 virtual bool GetResponseCookies(std::vector<std::string>* cookies); 116 virtual bool GetResponseCookies(std::vector<std::string>* cookies);
117 117
118 // Called to fetch the encoding types for this request. Only makes sense for 118 // Called to setup a stream filter for this request. An example of filter is
119 // some types of requests. Returns true on success. Calling this on a request
120 // that doesn't have or specify an encoding type will return false.
121 // Returns a array of strings showing the sequential encodings used on the
122 // content.
123 // For example, encoding_types[0] = FILTER_TYPE_SDCH and encoding_types[1] =
124 // FILTER_TYPE_GZIP, means the content was first encoded by sdch, and then
125 // result was encoded by gzip. To decode, a series of filters must be applied
126 // in the reverse order (in the above example, ungzip first, and then sdch
127 // expand).
128 virtual bool GetContentEncodings(
129 std::vector<Filter::FilterType>* encoding_types);
130
131 // Called to setup stream filter for this request. An example of filter is
132 // content encoding/decoding. 119 // content encoding/decoding.
133 void SetupFilter(); 120 // Subclasses should return the appropriate Filter, or NULL for no Filter.
121 // This class takes ownership of the returned Filter.
122 //
123 // The default implementation returns NULL.
124 virtual Filter* SetupFilter() const;
134 125
135 // Called to determine if this response is a redirect. Only makes sense 126 // Called to determine if this response is a redirect. Only makes sense
136 // for some types of requests. This method returns true if the response 127 // for some types of requests. This method returns true if the response
137 // is a redirect, and fills in the location param with the URL of the 128 // is a redirect, and fills in the location param with the URL of the
138 // redirect. The HTTP status code (e.g., 302) is filled into 129 // redirect. The HTTP status code (e.g., 302) is filled into
139 // |*http_status_code| to signify the type of redirect. 130 // |*http_status_code| to signify the type of redirect.
140 // 131 //
141 // The caller is responsible for following the redirect by setting up an 132 // The caller is responsible for following the redirect by setting up an
142 // appropriate replacement Job. Note that the redirected location may be 133 // appropriate replacement Job. Note that the redirected location may be
143 // invalid, the caller should be sure it can handle this. 134 // invalid, the caller should be sure it can handle this.
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 // The count of the number of packets, some of which may not have been timed. 389 // The count of the number of packets, some of which may not have been timed.
399 // We're ignoring overflow, as 1430 x 2^31 is a LOT of bytes. 390 // We're ignoring overflow, as 1430 x 2^31 is a LOT of bytes.
400 int observed_packet_count_; 391 int observed_packet_count_;
401 392
402 DISALLOW_COPY_AND_ASSIGN(URLRequestJob); 393 DISALLOW_COPY_AND_ASSIGN(URLRequestJob);
403 }; 394 };
404 395
405 } // namespace net 396 } // namespace net
406 397
407 #endif // NET_URL_REQUEST_URL_REQUEST_JOB_H_ 398 #endif // NET_URL_REQUEST_URL_REQUEST_JOB_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698