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

Unified Diff: chrome/browser/task_profiler/task_profiler_data_serializer.h

Issue 9702014: [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 for chromeos/ (take 4) 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 side-by-side diff with in-line comments
Download patch
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
« 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