OLD | NEW |
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_H_ | 5 #ifndef NET_URL_REQUEST_URL_REQUEST_H_ |
6 #define NET_URL_REQUEST_URL_REQUEST_H_ | 6 #define NET_URL_REQUEST_URL_REQUEST_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 #include <string> | 10 #include <string> |
11 #include <vector> | 11 #include <vector> |
12 | 12 |
13 #include "base/leak_tracker.h" | 13 #include "base/leak_tracker.h" |
14 #include "base/linked_ptr.h" | 14 #include "base/linked_ptr.h" |
15 #include "base/logging.h" | 15 #include "base/logging.h" |
16 #include "base/non_thread_safe.h" | 16 #include "base/non_thread_safe.h" |
17 #include "base/ref_counted.h" | 17 #include "base/ref_counted.h" |
| 18 #include "base/string16.h" |
18 #include "googleurl/src/gurl.h" | 19 #include "googleurl/src/gurl.h" |
19 #include "net/base/load_states.h" | 20 #include "net/base/load_states.h" |
20 #include "net/base/net_log.h" | 21 #include "net/base/net_log.h" |
21 #include "net/base/request_priority.h" | 22 #include "net/base/request_priority.h" |
22 #include "net/http/http_request_headers.h" | 23 #include "net/http/http_request_headers.h" |
23 #include "net/http/http_response_info.h" | 24 #include "net/http/http_response_info.h" |
24 #include "net/url_request/url_request_status.h" | 25 #include "net/url_request/url_request_status.h" |
25 | 26 |
26 namespace base { | 27 namespace base { |
27 class Time; | 28 class Time; |
(...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
497 void StopCaching(); | 498 void StopCaching(); |
498 | 499 |
499 // This method may be called to follow a redirect that was deferred in | 500 // This method may be called to follow a redirect that was deferred in |
500 // response to an OnReceivedRedirect call. | 501 // response to an OnReceivedRedirect call. |
501 void FollowDeferredRedirect(); | 502 void FollowDeferredRedirect(); |
502 | 503 |
503 // One of the following two methods should be called in response to an | 504 // One of the following two methods should be called in response to an |
504 // OnAuthRequired() callback (and only then). | 505 // OnAuthRequired() callback (and only then). |
505 // SetAuth will reissue the request with the given credentials. | 506 // SetAuth will reissue the request with the given credentials. |
506 // CancelAuth will give up and display the error page. | 507 // CancelAuth will give up and display the error page. |
507 void SetAuth(const std::wstring& username, const std::wstring& password); | 508 void SetAuth(const string16& username, const string16& password); |
508 void CancelAuth(); | 509 void CancelAuth(); |
509 | 510 |
510 // This method can be called after the user selects a client certificate to | 511 // This method can be called after the user selects a client certificate to |
511 // instruct this URLRequest to continue with the request with the | 512 // instruct this URLRequest to continue with the request with the |
512 // certificate. Pass NULL if the user doesn't have a client certificate. | 513 // certificate. Pass NULL if the user doesn't have a client certificate. |
513 void ContinueWithCertificate(net::X509Certificate* client_cert); | 514 void ContinueWithCertificate(net::X509Certificate* client_cert); |
514 | 515 |
515 // This method can be called after some error notifications to instruct this | 516 // This method can be called after some error notifications to instruct this |
516 // URLRequest to ignore the current error and continue with the request. To | 517 // URLRequest to ignore the current error and continue with the request. To |
517 // cancel the request instead, call Cancel(). | 518 // cancel the request instead, call Cancel(). |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
645 // The priority level for this request. Objects like ClientSocketPool use | 646 // The priority level for this request. Objects like ClientSocketPool use |
646 // this to determine which URLRequest to allocate sockets to first. | 647 // this to determine which URLRequest to allocate sockets to first. |
647 net::RequestPriority priority_; | 648 net::RequestPriority priority_; |
648 | 649 |
649 base::LeakTracker<URLRequest> leak_tracker_; | 650 base::LeakTracker<URLRequest> leak_tracker_; |
650 | 651 |
651 DISALLOW_COPY_AND_ASSIGN(URLRequest); | 652 DISALLOW_COPY_AND_ASSIGN(URLRequest); |
652 }; | 653 }; |
653 | 654 |
654 #endif // NET_URL_REQUEST_URL_REQUEST_H_ | 655 #endif // NET_URL_REQUEST_URL_REQUEST_H_ |
OLD | NEW |