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

Unified Diff: components/tracing/child/child_trace_message_filter.h

Issue 2724793002: Revert of memory-infra: Finish moving memory_infra from TracingController (Closed)
Patch Set: Created 3 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
Index: components/tracing/child/child_trace_message_filter.h
diff --git a/components/tracing/child/child_trace_message_filter.h b/components/tracing/child/child_trace_message_filter.h
index 619de78381d91751eacff4561319dbb0496a1be1..287abd3503d2d7f9601b06cff280442bc24fd0fb 100644
--- a/components/tracing/child/child_trace_message_filter.h
+++ b/components/tracing/child/child_trace_message_filter.h
@@ -12,6 +12,7 @@
#include "base/memory/ref_counted_memory.h"
#include "base/metrics/histogram.h"
#include "base/time/time.h"
+#include "base/trace_event/memory_dump_request_args.h"
#include "components/tracing/tracing_export.h"
#include "ipc/message_filter.h"
@@ -31,6 +32,10 @@
void OnFilterAdded(IPC::Channel* channel) override;
void OnFilterRemoved() override;
bool OnMessageReceived(const IPC::Message& message) override;
+
+ void SendGlobalMemoryDumpRequest(
+ const base::trace_event::MemoryDumpRequestArgs& args,
+ const base::trace_event::MemoryDumpCallback& callback);
base::SingleThreadTaskRunner* ipc_task_runner() const {
return ipc_task_runner_;
@@ -53,6 +58,9 @@
const std::string& event_name);
void OnCancelWatchEvent();
void OnWatchEventMatched();
+ void OnProcessMemoryDumpRequest(
+ const base::trace_event::MemoryDumpRequestArgs& args);
+ void OnGlobalMemoryDumpResponse(uint64_t dump_guid, bool success);
void OnSetUMACallback(const std::string& histogram_name,
int histogram_lower_value,
int histogram_upper_value,
@@ -71,10 +79,19 @@
const scoped_refptr<base::RefCountedString>& events_str_ptr,
bool has_more_events);
+ void OnProcessMemoryDumpDone(uint64_t dump_guid, bool success);
+
void SetSenderForTesting(IPC::Sender* sender);
IPC::Sender* sender_;
base::SingleThreadTaskRunner* ipc_task_runner_;
+
+ // guid of the outstanding request (to the Browser's MemoryDumpManager), if
+ // any. 0 if there is no request pending.
+ uint64_t pending_memory_dump_guid_;
+
+ // callback of the outstanding memory dump request, if any.
+ base::trace_event::MemoryDumpCallback pending_memory_dump_callback_;
base::Time histogram_last_changed_;

Powered by Google App Engine
This is Rietveld 408576698