| Index: base/location.h
|
| diff --git a/base/location.h b/base/location.h
|
| index 2fbe62cde82dbd737cc3aa44c4faad400080d54d..34c88eff9203882a150bf0ef3cdaa9f934edac98 100644
|
| --- a/base/location.h
|
| +++ b/base/location.h
|
| @@ -10,6 +10,10 @@
|
| #include "base/base_export.h"
|
| #include "base/values.h"
|
|
|
| +namespace base {
|
| +class DictionaryValue;
|
| +}
|
| +
|
| namespace tracked_objects {
|
|
|
| // Location provides basic info where of an object was constructed, or was
|
| @@ -58,10 +62,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_;
|
| @@ -69,6 +69,22 @@ 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();
|
| + SerializedLocation(const tracked_objects::Location& location);
|
| + ~SerializedLocation();
|
| +
|
| + // Writes the serialized data into the passed |dictionary|.
|
| + void ToValue(base::DictionaryValue* dictionary) const;
|
| +
|
| + 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.
|
|
|