| 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 #include "net/url_request/url_request.h" | 5 #include "net/url_request/url_request.h" |
| 6 | 6 |
| 7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
| 8 #include "base/memory/singleton.h" | 8 #include "base/memory/singleton.h" |
| 9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
| 10 #include "base/metrics/stats_counters.h" | 10 #include "base/metrics/stats_counters.h" |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 SSLCertRequestInfo* cert_request_info) { | 91 SSLCertRequestInfo* cert_request_info) { |
| 92 request->ContinueWithCertificate(NULL); | 92 request->ContinueWithCertificate(NULL); |
| 93 } | 93 } |
| 94 | 94 |
| 95 void URLRequest::Delegate::OnSSLCertificateError(URLRequest* request, | 95 void URLRequest::Delegate::OnSSLCertificateError(URLRequest* request, |
| 96 int cert_error, | 96 int cert_error, |
| 97 X509Certificate* cert) { | 97 X509Certificate* cert) { |
| 98 request->Cancel(); | 98 request->Cancel(); |
| 99 } | 99 } |
| 100 | 100 |
| 101 void URLRequest::Delegate::OnGetCookies(URLRequest* request, | 101 bool URLRequest::Delegate::CanGetCookies(URLRequest* request) { |
| 102 bool blocked_by_policy) { | 102 return true; |
| 103 } | 103 } |
| 104 | 104 |
| 105 void URLRequest::Delegate::OnSetCookie(URLRequest* request, | 105 bool URLRequest::Delegate::CanSetCookie(URLRequest* request, |
| 106 const std::string& cookie_line, | 106 const std::string& cookie_line, |
| 107 const CookieOptions& options, | 107 CookieOptions* options) { |
| 108 bool blocked_by_policy) { | 108 return true; |
| 109 } | 109 } |
| 110 | 110 |
| 111 /////////////////////////////////////////////////////////////////////////////// | 111 /////////////////////////////////////////////////////////////////////////////// |
| 112 // URLRequest | 112 // URLRequest |
| 113 | 113 |
| 114 URLRequest::URLRequest(const GURL& url, Delegate* delegate) | 114 URLRequest::URLRequest(const GURL& url, Delegate* delegate) |
| 115 : url_chain_(1, url), | 115 : url_chain_(1, url), |
| 116 method_("GET"), | 116 method_("GET"), |
| 117 load_flags_(LOAD_NORMAL), | 117 load_flags_(LOAD_NORMAL), |
| 118 delegate_(delegate), | 118 delegate_(delegate), |
| (...skipping 554 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 673 if (found != user_data_.end()) | 673 if (found != user_data_.end()) |
| 674 return found->second.get(); | 674 return found->second.get(); |
| 675 return NULL; | 675 return NULL; |
| 676 } | 676 } |
| 677 | 677 |
| 678 void URLRequest::SetUserData(const void* key, UserData* data) { | 678 void URLRequest::SetUserData(const void* key, UserData* data) { |
| 679 user_data_[key] = linked_ptr<UserData>(data); | 679 user_data_[key] = linked_ptr<UserData>(data); |
| 680 } | 680 } |
| 681 | 681 |
| 682 } // namespace net | 682 } // namespace net |
| OLD | NEW |