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

Side by Side Diff: chrome/browser/prefs/pref_metrics_service.h

Issue 19776015: Add UMA stat to track home button and page prefs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: for real Created 7 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/chrome_browser_main.cc ('k') | chrome/browser/prefs/pref_metrics_service.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_PREFS_PREF_METRICS_SERVICE_H_
6 #define CHROME_BROWSER_PREFS_PREF_METRICS_SERVICE_H_
7
8 #include "base/memory/singleton.h"
9 #include "chrome/browser/profiles/profile.h"
10 #include "components/browser_context_keyed_service/browser_context_keyed_service .h"
11 #include "components/browser_context_keyed_service/browser_context_keyed_service _factory.h"
12
13 // PrefMetricsService is responsible for recording prefs-related UMA stats.
14 class PrefMetricsService : public BrowserContextKeyedService {
15 public:
16 explicit PrefMetricsService(Profile* profile);
17 virtual ~PrefMetricsService();
18
19 class Factory : public BrowserContextKeyedServiceFactory {
20 public:
21 static Factory* GetInstance();
22 static PrefMetricsService* GetForProfile(Profile* profile);
23 private:
24 friend struct DefaultSingletonTraits<Factory>;
25
26 Factory();
27 virtual ~Factory();
28
29 // BrowserContextKeyedServiceFactory implementation
30 virtual BrowserContextKeyedService* BuildServiceInstanceFor(
31 content::BrowserContext* profile) const OVERRIDE;
32 virtual bool ServiceIsCreatedWithBrowserContext() const OVERRIDE;
33 virtual bool ServiceIsNULLWhileTesting() const OVERRIDE;
34 virtual content::BrowserContext* GetBrowserContextToUse(
35 content::BrowserContext* context) const OVERRIDE;
36 };
37 private:
38 // Record prefs state on browser context creation.
39 void RecordLaunchPrefs();
40
41 Profile* profile_;
42 };
43
44 #endif // CHROME_BROWSER_PREFS_PREF_METRICS_SERVICE_H_
OLDNEW
« no previous file with comments | « chrome/browser/chrome_browser_main.cc ('k') | chrome/browser/prefs/pref_metrics_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698