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

Unified Diff: base/location.h

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: Make sure to initialize all primitive fields Created 8 years, 9 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 | « no previous file | base/location.cc » ('j') | base/tracked_objects.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/location.h
diff --git a/base/location.h b/base/location.h
index fc9d3603251a27f526f599e564714ec3bb5befbc..a536602eedd0c28e15b80bb32d71183abe89c885 100644
--- a/base/location.h
+++ b/base/location.h
@@ -8,10 +8,7 @@
#include <string>
#include "base/base_export.h"
-
-namespace base {
-class DictionaryValue;
-}
+#include "base/basictypes.h"
namespace tracked_objects {
@@ -61,10 +58,6 @@ class BASE_EXPORT Location {
// Write function_name_ in HTML with '<' and '>' properly encoded.
void WriteFunctionName(std::string* output) const;
- // Construct a Value* representation. The caller assumes ownership of the
- // memory in the returned instance.
- base::DictionaryValue* ToValue() const;
-
private:
const char* function_name_;
const char* file_name_;
@@ -72,6 +65,19 @@ class BASE_EXPORT Location {
const void* program_counter_;
};
+// Serialized representation of the Location class that can safely be passed
+// across process boundaries.
+struct BASE_EXPORT SerializedLocation {
+ // The default constructor is exposed to support the IPC serialization macros.
+ SerializedLocation();
+ explicit SerializedLocation(const tracked_objects::Location& location);
+ ~SerializedLocation();
+
+ std::string file_name;
+ std::string function_name;
+ int line_number;
+};
+
BASE_EXPORT const void* GetProgramCounter();
// Define a macro to record the current source location.
« no previous file with comments | « no previous file | base/location.cc » ('j') | base/tracked_objects.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698