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

Unified Diff: base/trace_event/process_memory_dump.cc

Issue 951673002: Revert "Pull chromium at 2c3ffb2355a27c32f45e508ef861416b820c823b" (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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
« no previous file with comments | « base/trace_event/process_memory_dump.h ('k') | base/trace_event/process_memory_totals.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/trace_event/process_memory_dump.cc
diff --git a/base/trace_event/process_memory_dump.cc b/base/trace_event/process_memory_dump.cc
index 6da9132cf774c225976cacd3f69fe4eff6db1b5d..0a3e0965f0bc0e24ec8934b4676608c2d8d20090 100644
--- a/base/trace_event/process_memory_dump.cc
+++ b/base/trace_event/process_memory_dump.cc
@@ -4,25 +4,25 @@
#include "base/trace_event/process_memory_dump.h"
-#include "base/trace_event/process_memory_totals.h"
-#include "base/trace_event/trace_event_argument.h"
+#include "base/json/json_writer.h"
+#include "base/values.h"
namespace base {
namespace trace_event {
-ProcessMemoryDump::ProcessMemoryDump() : has_process_totals_(false) {
+ProcessMemoryDump::ProcessMemoryDump() {
}
ProcessMemoryDump::~ProcessMemoryDump() {
}
-void ProcessMemoryDump::AsValueInto(TracedValue* value) const {
- // Build up the [dumper name] -> [value] dictionary.
- if (has_process_totals_) {
- value->BeginDictionary("process_totals");
- process_totals_.AsValueInto(value);
- value->EndDictionary();
- }
+void ProcessMemoryDump::AppendAsTraceFormat(std::string* out) const {
+ // Build up the [dumper name] -> [serialized snapshot] JSON dictionary.
+ DictionaryValue dict;
+ std::string json_dict;
+ // TODO(primiano): this will append here the actual dumps from the dumpers.
+ base::JSONWriter::Write(&dict, &json_dict);
+ *out += json_dict;
}
} // namespace trace_event
« no previous file with comments | « base/trace_event/process_memory_dump.h ('k') | base/trace_event/process_memory_totals.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698