Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(52)

Side by Side Diff: net/url_request/url_request_context_storage.cc

Issue 10831277: [net] Change factory methods for HostResolver and HostCache to return a scoped_ptr (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove unnecessary initialization; respond to review Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/url_request/url_request_context_storage.h ('k') | net/url_request/url_request_test_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_storage.h" 5 #include "net/url_request/url_request_context_storage.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "net/base/cert_verifier.h" 8 #include "net/base/cert_verifier.h"
9 #include "net/base/host_resolver.h" 9 #include "net/base/host_resolver.h"
10 #include "net/base/net_log.h" 10 #include "net/base/net_log.h"
(...skipping 17 matching lines...) Expand all
28 DCHECK(context); 28 DCHECK(context);
29 } 29 }
30 30
31 URLRequestContextStorage::~URLRequestContextStorage() {} 31 URLRequestContextStorage::~URLRequestContextStorage() {}
32 32
33 void URLRequestContextStorage::set_net_log(NetLog* net_log) { 33 void URLRequestContextStorage::set_net_log(NetLog* net_log) {
34 context_->set_net_log(net_log); 34 context_->set_net_log(net_log);
35 net_log_.reset(net_log); 35 net_log_.reset(net_log);
36 } 36 }
37 37
38 void URLRequestContextStorage::set_host_resolver(HostResolver* host_resolver) { 38 void URLRequestContextStorage::set_host_resolver(
39 context_->set_host_resolver(host_resolver); 39 scoped_ptr<HostResolver> host_resolver) {
40 host_resolver_.reset(host_resolver); 40 context_->set_host_resolver(host_resolver.get());
41 host_resolver_ = host_resolver.Pass();
41 } 42 }
42 43
43 void URLRequestContextStorage::set_cert_verifier(CertVerifier* cert_verifier) { 44 void URLRequestContextStorage::set_cert_verifier(CertVerifier* cert_verifier) {
44 context_->set_cert_verifier(cert_verifier); 45 context_->set_cert_verifier(cert_verifier);
45 cert_verifier_.reset(cert_verifier); 46 cert_verifier_.reset(cert_verifier);
46 } 47 }
47 48
48 void URLRequestContextStorage::set_server_bound_cert_service( 49 void URLRequestContextStorage::set_server_bound_cert_service(
49 ServerBoundCertService* server_bound_cert_service) { 50 ServerBoundCertService* server_bound_cert_service) {
50 context_->set_server_bound_cert_service(server_bound_cert_service); 51 context_->set_server_bound_cert_service(server_bound_cert_service);
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 job_factory_.reset(job_factory); 117 job_factory_.reset(job_factory);
117 } 118 }
118 119
119 void URLRequestContextStorage::set_throttler_manager( 120 void URLRequestContextStorage::set_throttler_manager(
120 URLRequestThrottlerManager* throttler_manager) { 121 URLRequestThrottlerManager* throttler_manager) {
121 context_->set_throttler_manager(throttler_manager); 122 context_->set_throttler_manager(throttler_manager);
122 throttler_manager_.reset(throttler_manager); 123 throttler_manager_.reset(throttler_manager);
123 } 124 }
124 125
125 } // namespace net 126 } // namespace net
OLDNEW
« no previous file with comments | « net/url_request/url_request_context_storage.h ('k') | net/url_request/url_request_test_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698