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

Unified Diff: components/metrics/metrics_service_client.h

Issue 1411593004: Eliminate //chrome dependencies from MetricsServicesManager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix official build Created 5 years, 2 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/metrics/metrics_service_client.h
diff --git a/components/metrics/metrics_service_client.h b/components/metrics/metrics_service_client.h
index 4cbebda48ce0bd332b501028a89a389ea7c3fdcf..3671a68747dc7946ec05de4ad53eb19a728191ed 100644
--- a/components/metrics/metrics_service_client.h
+++ b/components/metrics/metrics_service_client.h
@@ -15,9 +15,14 @@
#include "base/time/time.h"
#include "components/metrics/proto/system_profile.pb.h"
+namespace base {
+class FilePath;
+}
+
namespace metrics {
class MetricsLogUploader;
+class MetricsService;
// An abstraction of operations that depend on the embedder's (e.g. Chrome)
// environment.
@@ -25,6 +30,12 @@ class MetricsServiceClient {
public:
virtual ~MetricsServiceClient() {}
+ // Returns the MetricsService instance that this client is associated with.
+ // With the exception of testing contexts, the returned instance must be valid
+ // for the lifetime of this object (typically, the embedder's client
+ // implementation will own the MetricsService instance being returned).
+ virtual MetricsService* GetMetricsService() = 0;
+
// Registers the client id with other services (e.g. crash reporting), called
// when metrics recording gets enabled.
virtual void SetMetricsClientId(const std::string& client_id) = 0;
@@ -79,6 +90,9 @@ class MetricsServiceClient {
// Returns the name of a key under HKEY_CURRENT_USER that can be used to store
// backups of metrics data. Unused except on Windows.
virtual base::string16 GetRegistryBackupKey();
+
+ // Called on plugin loading errors.
+ virtual void OnPluginLoadingError(const base::FilePath& plugin_path) {}
};
} // namespace metrics
« no previous file with comments | « chromecast/browser/metrics/cast_metrics_service_client.cc ('k') | components/metrics/test_metrics_service_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698