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

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

Issue 1059843002: Refactor NetLog::LogLevel --> NetLogCaptureMode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase again to fix a merge conflict Created 5 years, 8 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
« no previous file with comments | « google_apis/gcm/tools/mcs_probe.cc ('k') | net/base/sdch_net_log_params.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/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 NetLogCaptureMode capture_mode) {
19 base::DictionaryValue* dict = new base::DictionaryValue(); 19 base::DictionaryValue* dict = new base::DictionaryValue();
20 base::ListValue* list = new base::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(new base::StringValue(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;
(...skipping 57 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 | « google_apis/gcm/tools/mcs_probe.cc ('k') | net/base/sdch_net_log_params.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698