OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
13 #include "base/memory/weak_ptr.h" | 13 #include "base/memory/weak_ptr.h" |
14 #include "base/system_monitor/system_monitor.h" | 14 #include "base/system_monitor/system_monitor.h" |
15 #include "googleurl/src/gurl.h" | 15 #include "googleurl/src/gurl.h" |
16 #include "net/base/filter.h" | 16 #include "net/base/filter.h" |
17 #include "net/base/host_port_pair.h" | 17 #include "net/base/host_port_pair.h" |
18 #include "net/base/load_states.h" | 18 #include "net/base/load_states.h" |
19 #include "net/base/net_export.h" | 19 #include "net/base/net_export.h" |
| 20 #include "net/base/upload_progress.h" |
20 #include "net/cookies/canonical_cookie.h" | 21 #include "net/cookies/canonical_cookie.h" |
21 | 22 |
22 namespace net { | 23 namespace net { |
23 | 24 |
24 class AuthChallengeInfo; | 25 class AuthChallengeInfo; |
25 class AuthCredentials; | 26 class AuthCredentials; |
26 class CookieOptions; | 27 class CookieOptions; |
27 class HttpRequestHeaders; | 28 class HttpRequestHeaders; |
28 class HttpResponseInfo; | 29 class HttpResponseInfo; |
29 class IOBuffer; | 30 class IOBuffer; |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 bool Read(IOBuffer* buf, int buf_size, int* bytes_read); | 93 bool Read(IOBuffer* buf, int buf_size, int* bytes_read); |
93 | 94 |
94 // Stops further caching of this request, if any. For more info, see | 95 // Stops further caching of this request, if any. For more info, see |
95 // URLRequest::StopCaching(). | 96 // URLRequest::StopCaching(). |
96 virtual void StopCaching(); | 97 virtual void StopCaching(); |
97 | 98 |
98 // Called to fetch the current load state for the job. | 99 // Called to fetch the current load state for the job. |
99 virtual LoadState GetLoadState() const; | 100 virtual LoadState GetLoadState() const; |
100 | 101 |
101 // Called to get the upload progress in bytes. | 102 // Called to get the upload progress in bytes. |
102 virtual uint64 GetUploadProgress() const; | 103 virtual UploadProgress GetUploadProgress() const; |
103 | 104 |
104 // Called to fetch the charset for this request. Only makes sense for some | 105 // Called to fetch the charset for this request. Only makes sense for some |
105 // types of requests. Returns true on success. Calling this on a type that | 106 // types of requests. Returns true on success. Calling this on a type that |
106 // doesn't have a charset will return false. | 107 // doesn't have a charset will return false. |
107 virtual bool GetCharset(std::string* charset); | 108 virtual bool GetCharset(std::string* charset); |
108 | 109 |
109 // Called to get response info. | 110 // Called to get response info. |
110 virtual void GetResponseInfo(HttpResponseInfo* info); | 111 virtual void GetResponseInfo(HttpResponseInfo* info); |
111 | 112 |
112 // Returns the cookie values included in the response, if applicable. | 113 // Returns the cookie values included in the response, if applicable. |
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
378 NetworkDelegate* network_delegate_; | 379 NetworkDelegate* network_delegate_; |
379 | 380 |
380 base::WeakPtrFactory<URLRequestJob> weak_factory_; | 381 base::WeakPtrFactory<URLRequestJob> weak_factory_; |
381 | 382 |
382 DISALLOW_COPY_AND_ASSIGN(URLRequestJob); | 383 DISALLOW_COPY_AND_ASSIGN(URLRequestJob); |
383 }; | 384 }; |
384 | 385 |
385 } // namespace net | 386 } // namespace net |
386 | 387 |
387 #endif // NET_URL_REQUEST_URL_REQUEST_JOB_H_ | 388 #endif // NET_URL_REQUEST_URL_REQUEST_JOB_H_ |
OLD | NEW |