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

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

Issue 10539094: NetLogEventParameter to Callback refactoring 1, (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Remove unneeded line Created 8 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "net/base/address_list_net_log_param.h"
6
7 #include "base/values.h"
8 #include "net/base/net_util.h"
9
10 namespace net {
11
12 AddressListNetLogParam::AddressListNetLogParam(const AddressList& address_list)
13 : address_list_(address_list) {
14 }
15
16 Value* AddressListNetLogParam::ToValue() const {
17 DictionaryValue* dict = new DictionaryValue();
18 ListValue* list = new ListValue();
19
20 for (size_t i = 0; i < address_list_.size() ; ++i) {
21 list->Append(Value::CreateStringValue(address_list_[i].ToString()));
22 }
23
24 dict->Set("address_list", list);
25 return dict;
26 }
27
28 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698