1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_TASK_PROFILER_TASK_PROFILER_DATA_SERIALIZER_H_
6 #define CHROME_BROWSER_TASK_PROFILER_TASK_PROFILER_DATA_SERIALIZER_H_
8 #include "base/basictypes.h"
9 #include "base/process/process_handle.h"
12 class DictionaryValue
;
16 namespace tracked_objects
{
17 struct ProcessDataPhaseSnapshot
;
20 namespace task_profiler
{
22 // This class collects task profiler data and serializes it to a file. The file
23 // format is compatible with the about:profiler UI.
24 class TaskProfilerDataSerializer
{
26 TaskProfilerDataSerializer() {}
28 // Writes the contents of |process_data_phase|, |process_id| and
29 // |process_type| into |dictionary|.
31 const tracked_objects::ProcessDataPhaseSnapshot
& process_data_phase
,
32 base::ProcessId process_id
,
34 base::DictionaryValue
* dictionary
);
37 DISALLOW_COPY_AND_ASSIGN(TaskProfilerDataSerializer
);
40 } // namespace task_profiler
42 #endif // CHROME_BROWSER_TASK_PROFILER_TASK_PROFILER_DATA_SERIALIZER_H_