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

Side by Side Diff: net/dns/dns_client.cc

Issue 15829004: Update net/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: license twerk Created 7 years, 6 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/disk_cache/stress_cache.cc ('k') | net/dns/dns_query.h » ('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/dns/dns_client.h" 5 #include "net/dns/dns_client.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/rand_util.h" 8 #include "base/rand_util.h"
9 #include "net/base/net_log.h" 9 #include "net/base/net_log.h"
10 #include "net/dns/address_sorter.h" 10 #include "net/dns/address_sorter.h"
(...skipping 18 matching lines...) Expand all
29 session_ = NULL; 29 session_ = NULL;
30 if (config.IsValid()) { 30 if (config.IsValid()) {
31 ClientSocketFactory* factory = ClientSocketFactory::GetDefaultFactory(); 31 ClientSocketFactory* factory = ClientSocketFactory::GetDefaultFactory();
32 scoped_ptr<DnsSocketPool> socket_pool( 32 scoped_ptr<DnsSocketPool> socket_pool(
33 config.randomize_ports ? DnsSocketPool::CreateDefault(factory) 33 config.randomize_ports ? DnsSocketPool::CreateDefault(factory)
34 : DnsSocketPool::CreateNull(factory)); 34 : DnsSocketPool::CreateNull(factory));
35 session_ = new DnsSession(config, 35 session_ = new DnsSession(config,
36 socket_pool.Pass(), 36 socket_pool.Pass(),
37 base::Bind(&base::RandInt), 37 base::Bind(&base::RandInt),
38 net_log_); 38 net_log_);
39 factory_ = DnsTransactionFactory::CreateFactory(session_); 39 factory_ = DnsTransactionFactory::CreateFactory(session_.get());
40 } 40 }
41 } 41 }
42 42
43 virtual const DnsConfig* GetConfig() const OVERRIDE { 43 virtual const DnsConfig* GetConfig() const OVERRIDE {
44 return session_.get() ? &session_->config() : NULL; 44 return session_.get() ? &session_->config() : NULL;
45 } 45 }
46 46
47 virtual DnsTransactionFactory* GetTransactionFactory() OVERRIDE { 47 virtual DnsTransactionFactory* GetTransactionFactory() OVERRIDE {
48 return session_.get() ? factory_.get() : NULL; 48 return session_.get() ? factory_.get() : NULL;
49 } 49 }
(...skipping 12 matching lines...) Expand all
62 62
63 } // namespace 63 } // namespace
64 64
65 // static 65 // static
66 scoped_ptr<DnsClient> DnsClient::CreateClient(NetLog* net_log) { 66 scoped_ptr<DnsClient> DnsClient::CreateClient(NetLog* net_log) {
67 return scoped_ptr<DnsClient>(new DnsClientImpl(net_log)); 67 return scoped_ptr<DnsClient>(new DnsClientImpl(net_log));
68 } 68 }
69 69
70 } // namespace net 70 } // namespace net
71 71
OLDNEW
« no previous file with comments | « net/disk_cache/stress_cache.cc ('k') | net/dns/dns_query.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698