Index: base/location.h |
diff --git a/base/location.h b/base/location.h |
index fc9d3603251a27f526f599e564714ec3bb5befbc..05a4f66109058242f80a9036248ae57cef725261 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_; |
}; |
+// A "snapshotted" representation of the Location class that can safely be |
+// passed across process boundaries. |
+struct BASE_EXPORT LocationSnapshot { |
+ // The default constructor is exposed to support the IPC serialization macros. |
+ LocationSnapshot(); |
+ explicit LocationSnapshot(const tracked_objects::Location& location); |
+ ~LocationSnapshot(); |
+ |
+ 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. |