summaryrefslogtreecommitdiffstats
path: root/components
diff options
context:
space:
mode:
authorisherman@chromium.org <isherman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-20 14:50:17 +0000
committerisherman@chromium.org <isherman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-20 14:50:17 +0000
commit36b392e02cf06ebdbd0a3b30f8ac3409decb1e55 (patch)
treea59fe82846d1ac6f8f68917998f2d3f6f2f545c7 /components
parent6047f1929b54f9d4cb6bd6bfed6392a3fc080253 (diff)
downloadchromium_src-36b392e02cf06ebdbd0a3b30f8ac3409decb1e55.zip
chromium_src-36b392e02cf06ebdbd0a3b30f8ac3409decb1e55.tar.gz
chromium_src-36b392e02cf06ebdbd0a3b30f8ac3409decb1e55.tar.bz2
[Metrics] Move MetricsServiceObserver into //components/metrics
BUG=374204 TEST=compiles R=asvitkine@chromium.org, blundell@chromium.org TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/293663002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@271639 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'components')
-rw-r--r--components/metrics.gypi2
-rw-r--r--components/metrics/metrics_service_observer.cc11
-rw-r--r--components/metrics/metrics_service_observer.h25
3 files changed, 38 insertions, 0 deletions
diff --git a/components/metrics.gypi b/components/metrics.gypi
index 78e7a3c..8a058eb 100644
--- a/components/metrics.gypi
+++ b/components/metrics.gypi
@@ -24,6 +24,8 @@
'metrics/metrics_pref_names.cc',
'metrics/metrics_pref_names.h',
'metrics/metrics_service_client.h',
+ 'metrics/metrics_service_observer.cc',
+ 'metrics/metrics_service_observer.h',
'metrics/persisted_logs.cc',
'metrics/persisted_logs.h',
],
diff --git a/components/metrics/metrics_service_observer.cc b/components/metrics/metrics_service_observer.cc
new file mode 100644
index 0000000..576ca3b
--- /dev/null
+++ b/components/metrics/metrics_service_observer.cc
@@ -0,0 +1,11 @@
+// Copyright 2014 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 "components/metrics/metrics_service_observer.h"
+
+MetricsServiceObserver::MetricsServiceObserver() {
+}
+
+MetricsServiceObserver::~MetricsServiceObserver() {
+}
diff --git a/components/metrics/metrics_service_observer.h b/components/metrics/metrics_service_observer.h
new file mode 100644
index 0000000..510487e
--- /dev/null
+++ b/components/metrics/metrics_service_observer.h
@@ -0,0 +1,25 @@
+// Copyright 2014 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.
+
+#ifndef COMPONENTS_METRICS_METRICS_SERVICE_OBSERVER_H_
+#define COMPONENTS_METRICS_METRICS_SERVICE_OBSERVER_H_
+
+#include "base/macros.h"
+
+// MetricsServiceObserver receives notifications from MetricsService.
+// An observer must be added, removed, and notified on the same thread.
+class MetricsServiceObserver {
+ public:
+ // Called when a new MetricsLog is created.
+ virtual void OnDidCreateMetricsLog() = 0;
+
+ protected:
+ MetricsServiceObserver();
+ virtual ~MetricsServiceObserver();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(MetricsServiceObserver);
+};
+
+#endif // COMPONENTS_METRICS_METRICS_SERVICE_OBSERVER_H_