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

Unified Diff: chrome/browser/metrics/metrics_log.h

Issue 282093012: Remove dependencies of Metrics{Service,Log} on g_browser_process->local_state() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove cruft Created 6 years, 7 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/metrics_log.h
diff --git a/chrome/browser/metrics/metrics_log.h b/chrome/browser/metrics/metrics_log.h
index c074823fc6d0310a8974c0ae7cb16a457fee9f2f..b2b6fc09bfd2db5024daa4d5faf7377c2bfec1ac 100644
--- a/chrome/browser/metrics/metrics_log.h
+++ b/chrome/browser/metrics/metrics_log.h
@@ -69,7 +69,11 @@ class MetricsLog : public metrics::MetricsLogBase {
// Creates a new metrics log of the specified type.
// client_id is the identifier for this profile on this installation
// session_id is an integer that's incremented on each application launch
- MetricsLog(const std::string& client_id, int session_id, LogType log_type);
+ // |local_state| is the PrefService that this instance should use.
+ MetricsLog(const std::string& client_id,
+ int session_id,
+ LogType log_type,
+ PrefService* local_state);
virtual ~MetricsLog();
static void RegisterPrefs(PrefRegistrySimple* registry);
@@ -126,9 +130,6 @@ class MetricsLog : public metrics::MetricsLogBase {
protected:
// Exposed for the sake of mocking in test code.
- // Returns the PrefService from which to log metrics data.
- virtual PrefService* GetPrefService();
-
// Returns the screen size for the primary monitor.
virtual gfx::Size GetScreenSize() const;
@@ -189,6 +190,8 @@ class MetricsLog : public metrics::MetricsLogBase {
// For including information on which extensions are installed in reports.
HashedExtensionMetrics extension_metrics_;
+ PrefService* local_state_;
+
DISALLOW_COPY_AND_ASSIGN(MetricsLog);
};

Powered by Google App Engine
This is Rietveld 408576698