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

Unified Diff: components/arc/metrics/arc_metrics_service.h

Issue 2133503002: arc: Revamp the ArcBridgeService interface (Closed) Base URL: https://chromium.googlesource.com/a/chromium/src.git@master
Patch Set: more rebase 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: components/arc/metrics/arc_metrics_service.h
diff --git a/components/arc/metrics/arc_metrics_service.h b/components/arc/metrics/arc_metrics_service.h
index 4f611787a280051268a6672f7880a0ccc4952347..5978fe3e5f29b31c4746acf5f25e5f184d1a2068 100644
--- a/components/arc/metrics/arc_metrics_service.h
+++ b/components/arc/metrics/arc_metrics_service.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef COMPONENTS_ARC_METRICS_ARC_METRICS_SERVICE_H
-#define COMPONENTS_ARC_METRICS_ARC_METRICS_SERVICE_H
+#ifndef COMPONENTS_ARC_METRICS_ARC_METRICS_SERVICE_H_
+#define COMPONENTS_ARC_METRICS_ARC_METRICS_SERVICE_H_
#include "base/macros.h"
#include "base/memory/weak_ptr.h"
@@ -12,24 +12,29 @@
#include "components/arc/arc_bridge_service.h"
#include "components/arc/arc_service.h"
#include "components/arc/common/arc_bridge.mojom.h"
+#include "components/arc/instance_holder.h"
#include "components/arc/metrics/oom_kills_monitor.h"
#include "mojo/public/cpp/bindings/binding.h"
namespace arc {
// Collects information from other ArcServices and send UMA metrics.
-class ArcMetricsService : public ArcService,
- public ArcBridgeService::Observer,
- public mojom::MetricsHost {
+class ArcMetricsService
+ : public ArcService,
+ public InstanceHolder<mojom::MetricsInstance>::Observer,
+ public InstanceHolder<mojom::ProcessInstance>::Observer,
+ public mojom::MetricsHost {
public:
explicit ArcMetricsService(ArcBridgeService* bridge_service);
~ArcMetricsService() override;
- // ArcBridgeService::Observer overrides.
- void OnMetricsInstanceReady() override;
- void OnMetricsInstanceClosed() override;
- void OnProcessInstanceReady() override;
- void OnProcessInstanceClosed() override;
+ // InstanceHolder<mojom::MetricsInstance>::Observer overrides.
+ void OnInstanceReady(mojom::MetricsInstance*, uint32_t version) override;
+ void OnInstanceClosed(mojom::MetricsInstance*) override;
+
+ // InstanceHolder<mojom::ProcessInstance>::Observer overrides.
+ void OnInstanceReady(mojom::ProcessInstance*, uint32_t version) override;
+ void OnInstanceClosed(mojom::ProcessInstance*) override;
// MetricsHost overrides.
void ReportBootProgress(
@@ -63,4 +68,4 @@ class ArcMetricsService : public ArcService,
} // namespace arc
-#endif // COMPONENTS_ARC_METRICS_ARC_METRICS_SERVICE_H
+#endif // COMPONENTS_ARC_METRICS_ARC_METRICS_SERVICE_H_

Powered by Google App Engine
This is Rietveld 408576698