| 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..c76cb006378fa1071cd2c8ef00d4bc597ddfb4ac 100644
|
| --- a/chrome/browser/task_profiler/task_profiler_data_serializer.h
|
| +++ b/chrome/browser/task_profiler/task_profiler_data_serializer.h
|
| @@ -6,15 +6,36 @@
|
| #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 ProcessDataSnapshot;
|
| +}
|
| +
|
| 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() {}
|
| +
|
| + // Writes the contents of |process_data| and |process_type| into |dictionary|.
|
| + static void ToValue(const tracked_objects::ProcessDataSnapshot& process_data,
|
| + content::ProcessType process_type,
|
| + base::DictionaryValue* dictionary);
|
| +
|
| + bool WriteToFile(const FilePath& path);
|
| +
|
| + private:
|
| + DISALLOW_COPY_AND_ASSIGN(TaskProfilerDataSerializer);
|
| };
|
|
|
| } // namespace task_profiler
|
|
|