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

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
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_ ));
ramant (doing other things) 2011/10/24 18:03:49 nit: extra space after "file_name_".
jar (doing other things) 2011/10/24 18:43:27 Done.
+ // 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_ ));
ramant (doing other things) 2011/10/24 18:03:49 nit: extra space after "function_name_"
jar (doing other things) 2011/10/24 18:43:27 Done.
+ dictionary->Set("line_number", base::Value::CreateIntegerValue(line_number_));
+ return dictionary;
+}
+
#if defined(COMPILER_MSVC)
__declspec(noinline)
#endif

Powered by Google App Engine
This is Rietveld 408576698