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

Side by Side Diff: net/base/address_list.cc

Issue 12209080: Cleanup: Remove deprecated base::Value methods from net. Use base::Value too. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 10 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 | « no previous file | net/base/x509_certificate_net_log_param.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/base/address_list.h" 5 #include "net/base/address_list.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "net/base/net_util.h" 10 #include "net/base/net_util.h"
11 #include "net/base/sys_addrinfo.h" 11 #include "net/base/sys_addrinfo.h"
12 12
13 namespace net { 13 namespace net {
14 14
15 namespace { 15 namespace {
16 16
17 base::Value* NetLogAddressListCallback(const AddressList* address_list, 17 base::Value* NetLogAddressListCallback(const AddressList* address_list,
18 NetLog::LogLevel log_level) { 18 NetLog::LogLevel log_level) {
19 DictionaryValue* dict = new DictionaryValue(); 19 base::DictionaryValue* dict = new base::DictionaryValue();
20 ListValue* list = new ListValue(); 20 base::ListValue* list = new base::ListValue();
21 21
22 for (AddressList::const_iterator it = address_list->begin(); 22 for (AddressList::const_iterator it = address_list->begin();
23 it != address_list->end(); ++it) { 23 it != address_list->end(); ++it) {
24 list->Append(Value::CreateStringValue(it->ToString())); 24 list->Append(new base::StringValue(it->ToString()));
25 } 25 }
26 26
27 dict->Set("address_list", list); 27 dict->Set("address_list", list);
28 return dict; 28 return dict;
29 } 29 }
30 30
31 } // namespace 31 } // namespace
32 32
33 AddressList::AddressList() {} 33 AddressList::AddressList() {}
34 34
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 void AddressList::SetDefaultCanonicalName() { 86 void AddressList::SetDefaultCanonicalName() {
87 DCHECK(!empty()); 87 DCHECK(!empty());
88 set_canonical_name(front().ToStringWithoutPort()); 88 set_canonical_name(front().ToStringWithoutPort());
89 } 89 }
90 90
91 NetLog::ParametersCallback AddressList::CreateNetLogCallback() const { 91 NetLog::ParametersCallback AddressList::CreateNetLogCallback() const {
92 return base::Bind(&NetLogAddressListCallback, this); 92 return base::Bind(&NetLogAddressListCallback, this);
93 } 93 }
94 94
95 } // namespace net 95 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | net/base/x509_certificate_net_log_param.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698