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

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: Make sure to initialize all primitive fields Created 8 years, 9 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..1bd5e3cf23b30703c2a08c700d61f46649bde117 100644
--- a/chrome/browser/task_profiler/task_profiler_data_serializer.h
+++ b/chrome/browser/task_profiler/task_profiler_data_serializer.h
@@ -6,15 +6,37 @@
#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 SerializedProcessData;
+}
+
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() {}
+
+ // Re-serializes |process_data| and |process_type| into |dictionary|.
+ static void SerializeToJson(
+ const tracked_objects::SerializedProcessData& process_data,
+ content::ProcessType process_type,
+ base::DictionaryValue* dictionary);
+
+ bool WriteToFile(const FilePath& path);
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(TaskProfilerDataSerializer);
};
} // namespace task_profiler

Powered by Google App Engine
This is Rietveld 408576698