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/time.h" | |
8 #include "base/values.h" | 7 #include "base/values.h" |
9 | 8 |
10 namespace net { | 9 namespace net { |
11 | 10 |
12 // static | 11 // static |
13 const char* NetLog::EventTypeToString(EventType event) { | 12 const char* NetLog::EventTypeToString(EventType event) { |
14 switch (event) { | 13 switch (event) { |
15 #define EVENT_TYPE(label) case TYPE_ ## label: return #label; | 14 #define EVENT_TYPE(label) case TYPE_ ## label: return #label; |
16 #include "net/base/net_log_event_type_list.h" | 15 #include "net/base/net_log_event_type_list.h" |
17 #undef EVENT_TYPE | 16 #undef EVENT_TYPE |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 | 102 |
104 DictionaryValue* source_dict = new DictionaryValue(); | 103 DictionaryValue* source_dict = new DictionaryValue(); |
105 source_dict->SetInteger(L"type", static_cast<int>(value_.type)); | 104 source_dict->SetInteger(L"type", static_cast<int>(value_.type)); |
106 source_dict->SetInteger(L"id", static_cast<int>(value_.id)); | 105 source_dict->SetInteger(L"id", static_cast<int>(value_.id)); |
107 | 106 |
108 dict->Set(ASCIIToWide(name_), source_dict); | 107 dict->Set(ASCIIToWide(name_), source_dict); |
109 return dict; | 108 return dict; |
110 } | 109 } |
111 | 110 |
112 } // namespace net | 111 } // namespace net |
OLD | NEW |