OLD | NEW |
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> |
11 | 11 |
12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
14 #include "base/string16.h" | |
15 #include "base/system_monitor/system_monitor.h" | 14 #include "base/system_monitor/system_monitor.h" |
16 #include "base/task.h" | 15 #include "base/task.h" |
17 #include "base/time.h" | 16 #include "base/time.h" |
18 #include "googleurl/src/gurl.h" | 17 #include "googleurl/src/gurl.h" |
19 #include "net/base/filter.h" | 18 #include "net/base/filter.h" |
20 #include "net/base/host_port_pair.h" | 19 #include "net/base/host_port_pair.h" |
21 #include "net/base/load_states.h" | 20 #include "net/base/load_states.h" |
22 #include "net/base/net_export.h" | 21 #include "net/base/net_export.h" |
23 | 22 |
24 namespace net { | 23 namespace net { |
25 | 24 |
26 class AuthChallengeInfo; | 25 class AuthChallengeInfo; |
| 26 class AuthCredentials; |
27 class CookieList; | 27 class CookieList; |
28 class CookieOptions; | 28 class CookieOptions; |
29 class HttpRequestHeaders; | 29 class HttpRequestHeaders; |
30 class HttpResponseInfo; | 30 class HttpResponseInfo; |
31 class IOBuffer; | 31 class IOBuffer; |
32 class SSLCertRequestInfo; | 32 class SSLCertRequestInfo; |
33 class SSLInfo; | 33 class SSLInfo; |
34 class URLRequest; | 34 class URLRequest; |
35 class UploadData; | 35 class UploadData; |
36 class URLRequestStatus; | 36 class URLRequestStatus; |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 // Called to determine if this response is asking for authentication. Only | 145 // Called to determine if this response is asking for authentication. Only |
146 // makes sense for some types of requests. The caller is responsible for | 146 // makes sense for some types of requests. The caller is responsible for |
147 // obtaining the credentials passing them to SetAuth. | 147 // obtaining the credentials passing them to SetAuth. |
148 virtual bool NeedsAuth(); | 148 virtual bool NeedsAuth(); |
149 | 149 |
150 // Fills the authentication info with the server's response. | 150 // Fills the authentication info with the server's response. |
151 virtual void GetAuthChallengeInfo( | 151 virtual void GetAuthChallengeInfo( |
152 scoped_refptr<AuthChallengeInfo>* auth_info); | 152 scoped_refptr<AuthChallengeInfo>* auth_info); |
153 | 153 |
154 // Resend the request with authentication credentials. | 154 // Resend the request with authentication credentials. |
155 virtual void SetAuth(const string16& username, | 155 virtual void SetAuth(const AuthCredentials& credentials); |
156 const string16& password); | |
157 | 156 |
158 // Display the error page without asking for credentials again. | 157 // Display the error page without asking for credentials again. |
159 virtual void CancelAuth(); | 158 virtual void CancelAuth(); |
160 | 159 |
161 virtual void ContinueWithCertificate(X509Certificate* client_cert); | 160 virtual void ContinueWithCertificate(X509Certificate* client_cert); |
162 | 161 |
163 // Continue processing the request ignoring the last error. | 162 // Continue processing the request ignoring the last error. |
164 virtual void ContinueDespiteLastError(); | 163 virtual void ContinueDespiteLastError(); |
165 | 164 |
166 void FollowDeferredRedirect(); | 165 void FollowDeferredRedirect(); |
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
375 int deferred_redirect_status_code_; | 374 int deferred_redirect_status_code_; |
376 | 375 |
377 ScopedRunnableMethodFactory<URLRequestJob> method_factory_; | 376 ScopedRunnableMethodFactory<URLRequestJob> method_factory_; |
378 | 377 |
379 DISALLOW_COPY_AND_ASSIGN(URLRequestJob); | 378 DISALLOW_COPY_AND_ASSIGN(URLRequestJob); |
380 }; | 379 }; |
381 | 380 |
382 } // namespace net | 381 } // namespace net |
383 | 382 |
384 #endif // NET_URL_REQUEST_URL_REQUEST_JOB_H_ | 383 #endif // NET_URL_REQUEST_URL_REQUEST_JOB_H_ |
OLD | NEW |