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

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

Issue 173049: Revert r23616 from 172. (Closed) Base URL: svn://chrome-svn.corp.google.com/chrome/branches/172/src/
Patch Set: Created 11 years, 4 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
« no previous file with comments | « net/url_request/url_request.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
11 #include "base/ref_counted.h" 11 #include "base/ref_counted.h"
12 #include "base/scoped_ptr.h" 12 #include "base/scoped_ptr.h"
13 #include "googleurl/src/gurl.h"
14 #include "net/base/filter.h" 13 #include "net/base/filter.h"
15 #include "net/base/load_states.h" 14 #include "net/base/load_states.h"
16 15
17 namespace net { 16 namespace net {
18 class AuthChallengeInfo; 17 class AuthChallengeInfo;
19 class HttpResponseInfo; 18 class HttpResponseInfo;
20 class IOBuffer; 19 class IOBuffer;
21 class UploadData; 20 class UploadData;
22 } 21 }
23 22
23 class GURL;
24 class URLRequest; 24 class URLRequest;
25 class URLRequestStatus; 25 class URLRequestStatus;
26 class URLRequestJobMetrics; 26 class URLRequestJobMetrics;
27 27
28 // The URLRequestJob is using RefCounterThreadSafe because some sub classes 28 // The URLRequestJob is using RefCounterThreadSafe because some sub classes
29 // can be destroyed on multiple threads. This is the case of the 29 // can be destroyed on multiple threads. This is the case of the
30 // UrlRequestFileJob. 30 // UrlRequestFileJob.
31 class URLRequestJob : public base::RefCountedThreadSafe<URLRequestJob>, 31 class URLRequestJob : public base::RefCountedThreadSafe<URLRequestJob>,
32 public FilterContext { 32 public FilterContext {
33 public: 33 public:
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 // Resend the request with authentication credentials. 164 // Resend the request with authentication credentials.
165 virtual void SetAuth(const std::wstring& username, 165 virtual void SetAuth(const std::wstring& username,
166 const std::wstring& password); 166 const std::wstring& password);
167 167
168 // Display the error page without asking for credentials again. 168 // Display the error page without asking for credentials again.
169 virtual void CancelAuth(); 169 virtual void CancelAuth();
170 170
171 // Continue processing the request ignoring the last error. 171 // Continue processing the request ignoring the last error.
172 virtual void ContinueDespiteLastError(); 172 virtual void ContinueDespiteLastError();
173 173
174 void FollowDeferredRedirect();
175
176 // Returns true if the Job is done producing response data and has called 174 // Returns true if the Job is done producing response data and has called
177 // NotifyDone on the request. 175 // NotifyDone on the request.
178 bool is_done() const { return done_; } 176 bool is_done() const { return done_; }
179 177
180 // Returns true if the job is doing performance profiling 178 // Returns true if the job is doing performance profiling
181 bool is_profiling() const { return is_profiling_; } 179 bool is_profiling() const { return is_profiling_; }
182 180
183 // Retrieve the performance measurement of the job. The data is encapsulated 181 // Retrieve the performance measurement of the job. The data is encapsulated
184 // with a URLRequestJobMetrics object. The caller owns this object from now 182 // with a URLRequestJobMetrics object. The caller owns this object from now
185 // on. 183 // on.
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 net::IOBuffer *read_buffer_; 313 net::IOBuffer *read_buffer_;
316 int read_buffer_len_; 314 int read_buffer_len_;
317 315
318 // Used by HandleResponseIfNecessary to track whether we've sent the 316 // Used by HandleResponseIfNecessary to track whether we've sent the
319 // OnResponseStarted callback and potentially redirect callbacks as well. 317 // OnResponseStarted callback and potentially redirect callbacks as well.
320 bool has_handled_response_; 318 bool has_handled_response_;
321 319
322 // Expected content size 320 // Expected content size
323 int64 expected_content_size_; 321 int64 expected_content_size_;
324 322
325 // Set when a redirect is deferred.
326 GURL deferred_redirect_url_;
327 int deferred_redirect_status_code_;
328 // Total number of bytes read from network (or cache) and and typically handed 323 // Total number of bytes read from network (or cache) and and typically handed
329 // to filter to process. Used to histogram compression ratios, and error 324 // to filter to process. Used to histogram compression ratios, and error
330 // recovery scenarios in filters. 325 // recovery scenarios in filters.
331 int64 filter_input_byte_count_; 326 int64 filter_input_byte_count_;
332 327
333 DISALLOW_COPY_AND_ASSIGN(URLRequestJob); 328 DISALLOW_COPY_AND_ASSIGN(URLRequestJob);
334 }; 329 };
335 330
336 #endif // NET_URL_REQUEST_URL_REQUEST_JOB_H_ 331 #endif // NET_URL_REQUEST_URL_REQUEST_JOB_H_
OLDNEW
« no previous file with comments | « net/url_request/url_request.cc ('k') | net/url_request/url_request_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698