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

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

Issue 10077001: [UMA] Use proper C++ objects to serialize tracked_objects across process boundaries. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix yet another IWYU in the chromeos/ code... Created 8 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 | Annotate | Revision Log
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 #pragma once 7 #pragma once
8 8
9 #include "base/basictypes.h"
10 #include "content/public/common/process_type.h"
11
9 class FilePath; 12 class FilePath;
10 13
14 namespace base {
15 class DictionaryValue;
16 }
17
18 namespace tracked_objects {
19 struct ProcessDataSnapshot;
20 }
21
11 namespace task_profiler { 22 namespace task_profiler {
12 23
13 // This class collects task profiler data and serializes it to a file. The file 24 // This class collects task profiler data and serializes it to a file. The file
14 // format is compatible with the about:profiler UI. 25 // format is compatible with the about:profiler UI.
15 class TaskProfilerDataSerializer { 26 class TaskProfilerDataSerializer {
16 public: 27 public:
17 bool WriteToFile(const FilePath &path); 28 TaskProfilerDataSerializer() {}
29
30 // Writes the contents of |process_data| and |process_type| into |dictionary|.
31 static void ToValue(const tracked_objects::ProcessDataSnapshot& process_data,
32 content::ProcessType process_type,
33 base::DictionaryValue* dictionary);
34
35 bool WriteToFile(const FilePath& path);
36
37 private:
38 DISALLOW_COPY_AND_ASSIGN(TaskProfilerDataSerializer);
18 }; 39 };
19 40
20 } // namespace task_profiler 41 } // namespace task_profiler
21 42
22 #endif // CHROME_BROWSER_TASK_PROFILER_TASK_PROFILER_DATA_SERIALIZER_H_ 43 #endif // CHROME_BROWSER_TASK_PROFILER_TASK_PROFILER_DATA_SERIALIZER_H_
OLDNEW
« no previous file with comments | « chrome/browser/resources/profiler/profiler.js ('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