| 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 #include "net/url_request/url_request_context.h" | 5 #include "net/url_request/url_request_context.h" |
| 6 | 6 |
| 7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
| 8 #include "base/debug/alias.h" | 8 #include "base/debug/alias.h" |
| 9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
| 10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 } | 94 } |
| 95 | 95 |
| 96 std::unique_ptr<URLRequest> URLRequestContext::CreateRequest( | 96 std::unique_ptr<URLRequest> URLRequestContext::CreateRequest( |
| 97 const GURL& url, | 97 const GURL& url, |
| 98 RequestPriority priority, | 98 RequestPriority priority, |
| 99 URLRequest::Delegate* delegate) const { | 99 URLRequest::Delegate* delegate) const { |
| 100 return base::WrapUnique( | 100 return base::WrapUnique( |
| 101 new URLRequest(url, priority, delegate, this, network_delegate_)); | 101 new URLRequest(url, priority, delegate, this, network_delegate_)); |
| 102 } | 102 } |
| 103 | 103 |
| 104 std::unique_ptr<URLRequest> URLRequestContext::CreateRequest( |
| 105 const GURL& url, |
| 106 RequestPriority priority, |
| 107 URLRequest::Delegate* delegate, |
| 108 NetworkTrafficAnnotationTag traffic_annotation) const { |
| 109 // |traffic_annotation| is just a tag that is extracted during static |
| 110 // code analysis and can be ignored here. |
| 111 return CreateRequest(url, priority, delegate); |
| 112 } |
| 113 |
| 104 void URLRequestContext::set_cookie_store(CookieStore* cookie_store) { | 114 void URLRequestContext::set_cookie_store(CookieStore* cookie_store) { |
| 105 cookie_store_ = cookie_store; | 115 cookie_store_ = cookie_store; |
| 106 } | 116 } |
| 107 | 117 |
| 108 void URLRequestContext::AssertNoURLRequests() const { | 118 void URLRequestContext::AssertNoURLRequests() const { |
| 109 int num_requests = url_requests_->size(); | 119 int num_requests = url_requests_->size(); |
| 110 if (num_requests != 0) { | 120 if (num_requests != 0) { |
| 111 // We're leaking URLRequests :( Dump the URL of the first one and record how | 121 // We're leaking URLRequests :( Dump the URL of the first one and record how |
| 112 // many we leaked so we have an idea of how bad it is. | 122 // many we leaked so we have an idea of how bad it is. |
| 113 char url_buf[128]; | 123 char url_buf[128]; |
| (...skipping 24 matching lines...) Expand all Loading... |
| 138 if (network_session) | 148 if (network_session) |
| 139 network_session->DumpMemoryStats(pmd, dump->absolute_name()); | 149 network_session->DumpMemoryStats(pmd, dump->absolute_name()); |
| 140 } | 150 } |
| 141 SSLClientSocketImpl::DumpSSLClientSessionMemoryStats(pmd); | 151 SSLClientSocketImpl::DumpSSLClientSessionMemoryStats(pmd); |
| 142 if (sdch_manager_) | 152 if (sdch_manager_) |
| 143 sdch_manager_->DumpMemoryStats(pmd, dump->absolute_name()); | 153 sdch_manager_->DumpMemoryStats(pmd, dump->absolute_name()); |
| 144 return true; | 154 return true; |
| 145 } | 155 } |
| 146 | 156 |
| 147 } // namespace net | 157 } // namespace net |
| OLD | NEW |