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

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

Issue 171099: Merge r21417 to 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"
13 #include "net/base/filter.h" 14 #include "net/base/filter.h"
14 #include "net/base/load_states.h" 15 #include "net/base/load_states.h"
15 16
16 namespace net { 17 namespace net {
17 class AuthChallengeInfo; 18 class AuthChallengeInfo;
18 class HttpResponseInfo; 19 class HttpResponseInfo;
19 class IOBuffer; 20 class IOBuffer;
20 class UploadData; 21 class UploadData;
21 } 22 }
22 23
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
174 // Returns true if the Job is done producing response data and has called 176 // Returns true if the Job is done producing response data and has called
175 // NotifyDone on the request. 177 // NotifyDone on the request.
176 bool is_done() const { return done_; } 178 bool is_done() const { return done_; }
177 179
178 // Returns true if the job is doing performance profiling 180 // Returns true if the job is doing performance profiling
179 bool is_profiling() const { return is_profiling_; } 181 bool is_profiling() const { return is_profiling_; }
180 182
181 // Retrieve the performance measurement of the job. The data is encapsulated 183 // Retrieve the performance measurement of the job. The data is encapsulated
182 // with a URLRequestJobMetrics object. The caller owns this object from now 184 // with a URLRequestJobMetrics object. The caller owns this object from now
183 // on. 185 // on.
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 net::IOBuffer *read_buffer_; 315 net::IOBuffer *read_buffer_;
314 int read_buffer_len_; 316 int read_buffer_len_;
315 317
316 // Used by HandleResponseIfNecessary to track whether we've sent the 318 // Used by HandleResponseIfNecessary to track whether we've sent the
317 // OnResponseStarted callback and potentially redirect callbacks as well. 319 // OnResponseStarted callback and potentially redirect callbacks as well.
318 bool has_handled_response_; 320 bool has_handled_response_;
319 321
320 // Expected content size 322 // Expected content size
321 int64 expected_content_size_; 323 int64 expected_content_size_;
322 324
325 // Set when a redirect is deferred.
326 GURL deferred_redirect_url_;
327 int deferred_redirect_status_code_;
323 // Total number of bytes read from network (or cache) and and typically handed 328 // Total number of bytes read from network (or cache) and and typically handed
324 // to filter to process. Used to histogram compression ratios, and error 329 // to filter to process. Used to histogram compression ratios, and error
325 // recovery scenarios in filters. 330 // recovery scenarios in filters.
326 int64 filter_input_byte_count_; 331 int64 filter_input_byte_count_;
327 332
328 DISALLOW_COPY_AND_ASSIGN(URLRequestJob); 333 DISALLOW_COPY_AND_ASSIGN(URLRequestJob);
329 }; 334 };
330 335
331 #endif // NET_URL_REQUEST_URL_REQUEST_JOB_H_ 336 #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