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

Unified Diff: content/public/common/serialized_profiler_data.cc

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 base_unittests failures 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: content/public/common/serialized_profiler_data.cc
diff --git a/content/public/common/serialized_profiler_data.cc b/content/public/common/serialized_profiler_data.cc
new file mode 100644
index 0000000000000000000000000000000000000000..c29d8a9faa77ed45a84676c63ece2cb396c258ee
--- /dev/null
+++ b/content/public/common/serialized_profiler_data.cc
@@ -0,0 +1,29 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "content/public/common/serialized_profiler_data.h"
+
+#include "base/values.h"
+
+namespace content {
+
+//------------------------------------------------------------------------------
+SerializedProfilerData::SerializedProfilerData() {
+}
+
+SerializedProfilerData::SerializedProfilerData(
+ content::ProcessType process_type)
+ : process_type(process_type) {
+}
+
+SerializedProfilerData::~SerializedProfilerData() {
+}
+
+void SerializedProfilerData::ToValue(base::DictionaryValue* dictionary) const {
+ tracked_objects::SerializedProcessData::ToValue(dictionary);
+ dictionary->SetString("process_type",
+ content::GetProcessTypeNameInEnglish(process_type));
+}
+
+} // namespace content

Powered by Google App Engine
This is Rietveld 408576698