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

Unified Diff: base/location.cc

Issue 9702014: [UMA] Use proper C++ objects to serialize tracked_objects across process boundaries. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix yet another IWYU for chromeos/ (take 4) Created 8 years, 8 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/tracked_objects.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/location.cc
diff --git a/base/location.cc b/base/location.cc
index 275efa547920d8e47ebbc2f440baf0ece883186c..3422138750f62e9a2b973aed7c31b2b07f7f2dd0 100644
--- a/base/location.cc
+++ b/base/location.cc
@@ -14,7 +14,6 @@ extern "C" {
#include "base/location.h"
#include "base/string_number_conversions.h"
#include "base/stringprintf.h"
-#include "base/values.h"
namespace tracked_objects {
@@ -72,18 +71,21 @@ void Location::WriteFunctionName(std::string* output) const {
}
}
-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;
+//------------------------------------------------------------------------------
+LocationSnapshot::LocationSnapshot() : line_number(-1) {
}
+LocationSnapshot::LocationSnapshot(
+ const tracked_objects::Location& location)
+ : file_name(location.file_name()),
+ function_name(location.function_name()),
+ line_number(location.line_number()) {
+}
+
+LocationSnapshot::~LocationSnapshot() {
+}
+
+//------------------------------------------------------------------------------
#if defined(COMPILER_MSVC)
__declspec(noinline)
#endif
« no previous file with comments | « base/location.h ('k') | base/tracked_objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698