Chromium Code Reviews| Index: chrome/browser/task_profiler/task_profiler_data_serializer.h |
| diff --git a/chrome/browser/task_profiler/task_profiler_data_serializer.h b/chrome/browser/task_profiler/task_profiler_data_serializer.h |
| index 8ada67038be2113cdd1de9813670748ebcf41559..1bd5e3cf23b30703c2a08c700d61f46649bde117 100644 |
| --- a/chrome/browser/task_profiler/task_profiler_data_serializer.h |
| +++ b/chrome/browser/task_profiler/task_profiler_data_serializer.h |
| @@ -6,15 +6,37 @@ |
| #define CHROME_BROWSER_TASK_PROFILER_TASK_PROFILER_DATA_SERIALIZER_H_ |
| #pragma once |
| +#include "base/basictypes.h" |
| +#include "content/public/common/process_type.h" |
| + |
| class FilePath; |
| +namespace base { |
| +class DictionaryValue; |
| +} |
| + |
| +namespace tracked_objects { |
| +struct SerializedProcessData; |
| +} |
| + |
| namespace task_profiler { |
| // This class collects task profiler data and serializes it to a file. The file |
| // format is compatible with the about:profiler UI. |
| class TaskProfilerDataSerializer { |
| public: |
| - bool WriteToFile(const FilePath &path); |
| + TaskProfilerDataSerializer() {} |
| + |
| + // Re-serializes |process_data| and |process_type| into |dictionary|. |
| + static void SerializeToJson( |
| + const tracked_objects::SerializedProcessData& process_data, |
|
jar (doing other things)
2012/03/21 18:19:55
IMO, this should be a method on the SerializedProc
Ilya Sherman
2012/03/21 19:23:02
I'd strongly prefer to keep the JSON serialization
|
| + content::ProcessType process_type, |
| + base::DictionaryValue* dictionary); |
| + |
| + bool WriteToFile(const FilePath& path); |
| + |
| + private: |
| + DISALLOW_COPY_AND_ASSIGN(TaskProfilerDataSerializer); |
| }; |
| } // namespace task_profiler |