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

Unified Diff: chrome/browser/metrics/leak_detector/leak_detector_controller.h

Issue 2064463002: Mojo interface/service for Leak Detector on remote process (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update ProtobufToMojoConverterTest Created 4 years, 5 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/metrics/leak_detector/leak_detector_controller.h
diff --git a/chrome/browser/metrics/leak_detector/leak_detector_controller.h b/chrome/browser/metrics/leak_detector/leak_detector_controller.h
index 7dabdfb8259e222970705533672bfc965d5f9e96..59b05ce4d1e3ca186097b34b3ad5a69be5f6bcec 100644
--- a/chrome/browser/metrics/leak_detector/leak_detector_controller.h
+++ b/chrome/browser/metrics/leak_detector/leak_detector_controller.h
@@ -9,6 +9,7 @@
#include "base/macros.h"
#include "base/threading/thread_checker.h"
+#include "chrome/browser/metrics/leak_detector/leak_detector_remote_controller.h"
#include "components/metrics/leak_detector/leak_detector.h"
#include "components/metrics/proto/memory_leak_report.pb.h"
@@ -16,7 +17,9 @@ namespace metrics {
// This class initializes the LeakDetector on the browser process and registers
// itself to be notified of leak reports.
-class LeakDetectorController : public LeakDetector::Observer {
+class LeakDetectorController
+ : public LeakDetector::Observer,
+ public LeakDetectorRemoteController::LocalController {
public:
LeakDetectorController();
~LeakDetectorController() override;
@@ -29,7 +32,19 @@ class LeakDetectorController : public LeakDetector::Observer {
// LeakDetector::Observer:
void OnLeaksFound(const std::vector<MemoryLeakReportProto>& reports) override;
+ // LeakDetectorRemoteController::LocalController:
+ MemoryLeakReportProto::Params GetParams() const override;
+ void SendLeakReports(
+ const std::vector<MemoryLeakReportProto>& reports) override;
+ void OnRemoteProcessShutdown() override;
+
private:
+ // Stores a given array of leak reports in |stored_reports_|. |process_type|
+ // is the type of process that generated these reports. The reports must all
+ // come from the same process type.
+ void StoreLeakReports(const std::vector<MemoryLeakReportProto>& reports,
+ MemoryLeakReportProto::ProcessType process_type);
+
// All leak reports received through OnLeakFound() are stored in protobuf
// format.
std::vector<MemoryLeakReportProto> stored_reports_;
« no previous file with comments | « chrome/browser/chrome_content_browser_client.cc ('k') | chrome/browser/metrics/leak_detector/leak_detector_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698