Chromium Code Reviews| Index: base/location.h |
| diff --git a/base/location.h b/base/location.h |
| index fc9d3603251a27f526f599e564714ec3bb5befbc..ce948d02fed66aaf9c2ca45223ad7451487c9925 100644 |
| --- a/base/location.h |
| +++ b/base/location.h |
| @@ -9,10 +9,6 @@ |
| #include "base/base_export.h" |
| -namespace base { |
| -class DictionaryValue; |
| -} |
| - |
| namespace tracked_objects { |
| // Location provides basic info where of an object was constructed, or was |
| @@ -61,10 +57,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 +64,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 { |
|
jar (doing other things)
2012/03/21 18:19:55
IMO: It is much better to use classes, and accesso
Ilya Sherman
2012/03/21 19:23:02
Hmm. If these were to be classes, they would need
|
| + // 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. |