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

Unified Diff: base/location.cc

Issue 8313013: Support JSON encoding of data for about:tracking information (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 2 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 | « base/location.h ('k') | base/message_loop.cc » ('j') | base/tracked_objects.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/location.cc
===================================================================
--- base/location.cc (revision 106875)
+++ base/location.cc (working copy)
@@ -71,6 +71,18 @@
}
}
+base::DictionaryValue* Location::ToValue() const {
+ base::DictionaryValue* dictionary = new base::DictionaryValue;
+ dictionary->Set("file_name", base::Value::CreateStringValue(file_name_));
+ // Note: This function name is not escaped, and templates have less than
+ // characters, which means this is not suitable for display as HTML unless
+ // properly escaped.
+ dictionary->Set("function_name",
+ base::Value::CreateStringValue(function_name_));
+ dictionary->Set("line_number", base::Value::CreateIntegerValue(line_number_));
+ return dictionary;
+}
+
#if defined(COMPILER_MSVC)
__declspec(noinline)
#endif
« no previous file with comments | « base/location.h ('k') | base/message_loop.cc » ('j') | base/tracked_objects.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698