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

Unified Diff: net/base/net_log.cc

Issue 3119027: Adds HostResolveImpl Requests and Jobs to log. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/base/net_log.h ('k') | net/base/net_log_event_type_list.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/net_log.cc
===================================================================
--- net/base/net_log.cc (revision 57182)
+++ net/base/net_log.cc (working copy)
@@ -11,6 +11,13 @@
namespace net {
+Value* NetLog::Source::ToValue() const {
+ DictionaryValue* dict = new DictionaryValue();
+ dict->SetInteger("type", static_cast<int>(type));
+ dict->SetInteger("id", static_cast<int>(id));
+ return dict;
+}
+
// static
const char* NetLog::EventTypeToString(EventType event) {
switch (event) {
@@ -169,11 +176,7 @@
Value* NetLogSourceParameter::ToValue() const {
DictionaryValue* dict = new DictionaryValue();
- DictionaryValue* source_dict = new DictionaryValue();
- source_dict->SetInteger("type", static_cast<int>(value_.type));
- source_dict->SetInteger("id", static_cast<int>(value_.id));
-
- dict->Set(name_, source_dict);
+ dict->Set(name_, value_.ToValue());
return dict;
}
« no previous file with comments | « net/base/net_log.h ('k') | net/base/net_log_event_type_list.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698