OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/net_log.h" | 5 #include "net/base/net_log.h" |
6 #include "base/string_util.h" | 6 #include "base/string_util.h" |
7 #include "base/values.h" | 7 #include "base/values.h" |
8 | 8 |
9 namespace net { | 9 namespace net { |
10 | 10 |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 dict->SetInteger(ASCIIToWide(name_), value_); | 90 dict->SetInteger(ASCIIToWide(name_), value_); |
91 return dict; | 91 return dict; |
92 } | 92 } |
93 | 93 |
94 Value* NetLogStringParameter::ToValue() const { | 94 Value* NetLogStringParameter::ToValue() const { |
95 DictionaryValue* dict = new DictionaryValue(); | 95 DictionaryValue* dict = new DictionaryValue(); |
96 dict->SetString(ASCIIToWide(name_), value_); | 96 dict->SetString(ASCIIToWide(name_), value_); |
97 return dict; | 97 return dict; |
98 } | 98 } |
99 | 99 |
| 100 Value* NetLogSourceParameter::ToValue() const { |
| 101 DictionaryValue* dict = new DictionaryValue(); |
| 102 |
| 103 DictionaryValue* source_dict = new DictionaryValue(); |
| 104 source_dict->SetInteger(L"type", static_cast<int>(value_.type)); |
| 105 source_dict->SetInteger(L"id", static_cast<int>(value_.id)); |
| 106 |
| 107 dict->Set(ASCIIToWide(name_), source_dict); |
| 108 return dict; |
| 109 } |
| 110 |
100 } // namespace net | 111 } // namespace net |
OLD | NEW |