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 |