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

Side by Side Diff: chrome/browser/metrics/chrome_metrics_services_manager_client.h

Issue 1951553002: Enabled client side sampling for user metrics reporting. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_METRICS_CHROME_METRICS_SERVICES_MANAGER_CLIENT_H_ 5 #ifndef CHROME_BROWSER_METRICS_CHROME_METRICS_SERVICES_MANAGER_CLIENT_H_
6 #define CHROME_BROWSER_METRICS_CHROME_METRICS_SERVICES_MANAGER_CLIENT_H_ 6 #define CHROME_BROWSER_METRICS_CHROME_METRICS_SERVICES_MANAGER_CLIENT_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/feature_list.h"
10 #include "base/macros.h" 11 #include "base/macros.h"
11 #include "base/threading/thread_checker.h" 12 #include "base/threading/thread_checker.h"
12 #include "chrome/browser/safe_browsing/safe_browsing_service.h" 13 #include "chrome/browser/safe_browsing/safe_browsing_service.h"
13 #include "components/metrics_services_manager/metrics_services_manager_client.h" 14 #include "components/metrics_services_manager/metrics_services_manager_client.h"
14 15
15 class PrefService; 16 class PrefService;
16 17
17 namespace metrics { 18 namespace metrics {
18 class EnabledStateProvider; 19 class EnabledStateProvider;
19 class MetricsStateManager; 20 class MetricsStateManager;
20 } 21 }
21 22
23 // Metrics reporting feature. This feature, along with user consent, controls if
24 // recording and reporting are enabled. If the feature is enabled, but no
25 // consent is given, then there will be no recording or reporting.
26 extern const base::Feature kMetricsReportingFeature;
Alexei Svitkine (slow) 2016/07/19 15:23:59 If this will not be used outside the file, just pu
jwd 2016/07/19 21:21:49 It's going to be used by a metrics provider for re
27
22 // Provides a //chrome-specific implementation of MetricsServicesManagerClient. 28 // Provides a //chrome-specific implementation of MetricsServicesManagerClient.
23 class ChromeMetricsServicesManagerClient 29 class ChromeMetricsServicesManagerClient
24 : public metrics_services_manager::MetricsServicesManagerClient { 30 : public metrics_services_manager::MetricsServicesManagerClient {
25 public: 31 public:
26 explicit ChromeMetricsServicesManagerClient(PrefService* local_state); 32 explicit ChromeMetricsServicesManagerClient(PrefService* local_state);
27 ~ChromeMetricsServicesManagerClient() override; 33 ~ChromeMetricsServicesManagerClient() override;
28 34
29 private: 35 private:
30 // This is defined as a member class to get access to 36 // This is defined as a member class to get access to
31 // ChromeMetricsServiceAccessor through ChromeMetricsServicesManagerClient's 37 // ChromeMetricsServiceAccessor through ChromeMetricsServicesManagerClient's
(...skipping 29 matching lines...) Expand all
61 PrefService* local_state_; 67 PrefService* local_state_;
62 68
63 // Subscription to SafeBrowsing service state changes. 69 // Subscription to SafeBrowsing service state changes.
64 std::unique_ptr<safe_browsing::SafeBrowsingService::StateSubscription> 70 std::unique_ptr<safe_browsing::SafeBrowsingService::StateSubscription>
65 sb_state_subscription_; 71 sb_state_subscription_;
66 72
67 DISALLOW_COPY_AND_ASSIGN(ChromeMetricsServicesManagerClient); 73 DISALLOW_COPY_AND_ASSIGN(ChromeMetricsServicesManagerClient);
68 }; 74 };
69 75
70 #endif // CHROME_BROWSER_METRICS_CHROME_METRICS_SERVICES_MANAGER_CLIENT_H_ 76 #endif // CHROME_BROWSER_METRICS_CHROME_METRICS_SERVICES_MANAGER_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698