Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(392)

Side by Side Diff: chrome/browser/task_profiler/task_profiler_data_serializer.h

Issue 985773002: Introducing phased profiling framework (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@write_to_file
Patch Set: Fixing Android compile errors. Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_TASK_PROFILER_TASK_PROFILER_DATA_SERIALIZER_H_ 5 #ifndef CHROME_BROWSER_TASK_PROFILER_TASK_PROFILER_DATA_SERIALIZER_H_
6 #define CHROME_BROWSER_TASK_PROFILER_TASK_PROFILER_DATA_SERIALIZER_H_ 6 #define CHROME_BROWSER_TASK_PROFILER_TASK_PROFILER_DATA_SERIALIZER_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/process/process_handle.h"
9 10
10 namespace base { 11 namespace base {
11 class DictionaryValue; 12 class DictionaryValue;
12 class FilePath; 13 class FilePath;
13 } 14 }
14 15
15 namespace tracked_objects { 16 namespace tracked_objects {
16 struct ProcessDataSnapshot; 17 struct ProcessDataPhaseSnapshot;
17 } 18 }
18 19
19 namespace task_profiler { 20 namespace task_profiler {
20 21
21 // This class collects task profiler data and serializes it to a file. The file 22 // This class collects task profiler data and serializes it to a file. The file
22 // format is compatible with the about:profiler UI. 23 // format is compatible with the about:profiler UI.
23 class TaskProfilerDataSerializer { 24 class TaskProfilerDataSerializer {
24 public: 25 public:
25 TaskProfilerDataSerializer() {} 26 TaskProfilerDataSerializer() {}
26 27
27 // Writes the contents of |process_data| and |process_type| into |dictionary|. 28 // Writes the contents of |process_data_phase|, |process_id| and
28 static void ToValue(const tracked_objects::ProcessDataSnapshot& process_data, 29 // |process_type| into |dictionary|.
29 int process_type, 30 static void ToValue(
30 base::DictionaryValue* dictionary); 31 const tracked_objects::ProcessDataPhaseSnapshot& process_data_phase,
32 base::ProcessId process_id,
33 int process_type,
34 base::DictionaryValue* dictionary);
31 35
32 private: 36 private:
33 DISALLOW_COPY_AND_ASSIGN(TaskProfilerDataSerializer); 37 DISALLOW_COPY_AND_ASSIGN(TaskProfilerDataSerializer);
34 }; 38 };
35 39
36 } // namespace task_profiler 40 } // namespace task_profiler
37 41
38 #endif // CHROME_BROWSER_TASK_PROFILER_TASK_PROFILER_DATA_SERIALIZER_H_ 42 #endif // CHROME_BROWSER_TASK_PROFILER_TASK_PROFILER_DATA_SERIALIZER_H_
OLDNEW
« no previous file with comments | « chrome/browser/metrics/chrome_metrics_service_client.cc ('k') | chrome/browser/task_profiler/task_profiler_data_serializer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698