| OLD | NEW |
| 1 // Copyright (c) 2010 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/debug/leak_tracker.h" | 13 #include "base/debug/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 "base/string16.h" |
| 19 #include "googleurl/src/gurl.h" | 19 #include "googleurl/src/gurl.h" |
| 20 #include "net/base/cookie_monster.h" |
| 20 #include "net/base/load_states.h" | 21 #include "net/base/load_states.h" |
| 21 #include "net/base/net_log.h" | 22 #include "net/base/net_log.h" |
| 22 #include "net/base/request_priority.h" | 23 #include "net/base/request_priority.h" |
| 23 #include "net/http/http_request_headers.h" | 24 #include "net/http/http_request_headers.h" |
| 24 #include "net/http/http_response_info.h" | 25 #include "net/http/http_response_info.h" |
| 25 #include "net/url_request/url_request_status.h" | 26 #include "net/url_request/url_request_status.h" |
| 26 | 27 |
| 27 namespace base { | 28 namespace base { |
| 28 class Time; | 29 class Time; |
| 29 } // namespace base | 30 } // namespace base |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 // safe thing and Cancel() the request or decide to proceed by calling | 174 // safe thing and Cancel() the request or decide to proceed by calling |
| 174 // ContinueDespiteLastError(). cert_error is a net::ERR_* error code | 175 // ContinueDespiteLastError(). cert_error is a net::ERR_* error code |
| 175 // indicating what's wrong with the certificate. | 176 // indicating what's wrong with the certificate. |
| 176 virtual void OnSSLCertificateError(URLRequest* request, | 177 virtual void OnSSLCertificateError(URLRequest* request, |
| 177 int cert_error, | 178 int cert_error, |
| 178 net::X509Certificate* cert); | 179 net::X509Certificate* cert); |
| 179 | 180 |
| 180 // Called when reading cookies. |blocked_by_policy| is true if access to | 181 // Called when reading cookies. |blocked_by_policy| is true if access to |
| 181 // cookies was denied due to content settings. This method will never be | 182 // cookies was denied due to content settings. This method will never be |
| 182 // invoked when LOAD_DO_NOT_SEND_COOKIES is specified. | 183 // invoked when LOAD_DO_NOT_SEND_COOKIES is specified. |
| 183 virtual void OnGetCookies(URLRequest* request, bool blocked_by_policy); | 184 virtual void OnGetCookies(URLRequest* request, |
| 185 const net::CookieMonster::CookieList& cookie_list, |
| 186 bool blocked_by_policy); |
| 184 | 187 |
| 185 // Called when a cookie is set. |blocked_by_policy| is true if the cookie | 188 // Called when a cookie is set. |blocked_by_policy| is true if the cookie |
| 186 // was rejected due to content settings. This method will never be invoked | 189 // was rejected due to content settings. This method will never be invoked |
| 187 // when LOAD_DO_NOT_SAVE_COOKIES is specified. | 190 // when LOAD_DO_NOT_SAVE_COOKIES is specified. |
| 188 virtual void OnSetCookie(URLRequest* request, | 191 virtual void OnSetCookie(URLRequest* request, |
| 189 const std::string& cookie_line, | 192 const std::string& cookie_line, |
| 190 bool blocked_by_policy); | 193 bool blocked_by_policy); |
| 191 | 194 |
| 192 // After calling Start(), the delegate will receive an OnResponseStarted | 195 // After calling Start(), the delegate will receive an OnResponseStarted |
| 193 // callback when the request has completed. If an error occurred, the | 196 // callback when the request has completed. If an error occurred, the |
| (...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 637 // The priority level for this request. Objects like ClientSocketPool use | 640 // The priority level for this request. Objects like ClientSocketPool use |
| 638 // this to determine which URLRequest to allocate sockets to first. | 641 // this to determine which URLRequest to allocate sockets to first. |
| 639 net::RequestPriority priority_; | 642 net::RequestPriority priority_; |
| 640 | 643 |
| 641 base::debug::LeakTracker<URLRequest> leak_tracker_; | 644 base::debug::LeakTracker<URLRequest> leak_tracker_; |
| 642 | 645 |
| 643 DISALLOW_COPY_AND_ASSIGN(URLRequest); | 646 DISALLOW_COPY_AND_ASSIGN(URLRequest); |
| 644 }; | 647 }; |
| 645 | 648 |
| 646 #endif // NET_URL_REQUEST_URL_REQUEST_H_ | 649 #endif // NET_URL_REQUEST_URL_REQUEST_H_ |
| OLD | NEW |