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_builder.h" | 5 #include "net/url_request/url_request_context_builder.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 } | 158 } |
159 return file_thread_.get(); | 159 return file_thread_.get(); |
160 } | 160 } |
161 | 161 |
162 void set_transport_security_persister( | 162 void set_transport_security_persister( |
163 scoped_ptr<TransportSecurityPersister> transport_security_persister) { | 163 scoped_ptr<TransportSecurityPersister> transport_security_persister) { |
164 transport_security_persister = transport_security_persister.Pass(); | 164 transport_security_persister = transport_security_persister.Pass(); |
165 } | 165 } |
166 | 166 |
167 protected: | 167 protected: |
168 virtual ~BasicURLRequestContext() {} | 168 virtual ~BasicURLRequestContext() { |
| 169 AssertNoURLRequests(); |
| 170 } |
169 | 171 |
170 private: | 172 private: |
171 // Threads should be torn down last. | 173 // Threads should be torn down last. |
172 scoped_ptr<base::Thread> cache_thread_; | 174 scoped_ptr<base::Thread> cache_thread_; |
173 scoped_ptr<base::Thread> file_thread_; | 175 scoped_ptr<base::Thread> file_thread_; |
174 | 176 |
175 URLRequestContextStorage storage_; | 177 URLRequestContextStorage storage_; |
176 scoped_ptr<TransportSecurityPersister> transport_security_persister_; | 178 scoped_ptr<TransportSecurityPersister> transport_security_persister_; |
177 | 179 |
178 DISALLOW_COPY_AND_ASSIGN(BasicURLRequestContext); | 180 DISALLOW_COPY_AND_ASSIGN(BasicURLRequestContext); |
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
400 #endif // !defined(DISABLE_FTP_SUPPORT) | 402 #endif // !defined(DISABLE_FTP_SUPPORT) |
401 | 403 |
402 storage->set_job_factory(job_factory); | 404 storage->set_job_factory(job_factory); |
403 | 405 |
404 // TODO(willchan): Support sdch. | 406 // TODO(willchan): Support sdch. |
405 | 407 |
406 return context; | 408 return context; |
407 } | 409 } |
408 | 410 |
409 } // namespace net | 411 } // namespace net |
OLD | NEW |