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

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

Issue 2861563002: Add an override flag to enable metrics reporting. (Closed)
Patch Set: Rebase Created 3 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/metrics/chrome_metrics_service_client.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_SERVICE_CLIENT_H_ 5 #ifndef CHROME_BROWSER_METRICS_CHROME_METRICS_SERVICE_CLIENT_H_
6 #define CHROME_BROWSER_METRICS_CHROME_METRICS_SERVICE_CLIENT_H_ 6 #define CHROME_BROWSER_METRICS_CHROME_METRICS_SERVICE_CLIENT_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <deque> 10 #include <deque>
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 public: 57 public:
58 ~ChromeMetricsServiceClient() override; 58 ~ChromeMetricsServiceClient() override;
59 59
60 // Factory function. 60 // Factory function.
61 static std::unique_ptr<ChromeMetricsServiceClient> Create( 61 static std::unique_ptr<ChromeMetricsServiceClient> Create(
62 metrics::MetricsStateManager* state_manager); 62 metrics::MetricsStateManager* state_manager);
63 63
64 // Registers local state prefs used by this class. 64 // Registers local state prefs used by this class.
65 static void RegisterPrefs(PrefRegistrySimple* registry); 65 static void RegisterPrefs(PrefRegistrySimple* registry);
66 66
67 // Checks if the user has forced metrics collection on via the override flag.
68 static bool IsMetricsReportingForceEnabled();
69
67 // metrics::MetricsServiceClient: 70 // metrics::MetricsServiceClient:
68 metrics::MetricsService* GetMetricsService() override; 71 metrics::MetricsService* GetMetricsService() override;
69 ukm::UkmService* GetUkmService() override; 72 ukm::UkmService* GetUkmService() override;
70 void SetMetricsClientId(const std::string& client_id) override; 73 void SetMetricsClientId(const std::string& client_id) override;
71 int32_t GetProduct() override; 74 int32_t GetProduct() override;
72 std::string GetApplicationLocale() override; 75 std::string GetApplicationLocale() override;
73 bool GetBrand(std::string* brand_code) override; 76 bool GetBrand(std::string* brand_code) override;
74 metrics::SystemProfileProto::Channel GetChannel() override; 77 metrics::SystemProfileProto::Channel GetChannel() override;
75 std::string GetVersionString() override; 78 std::string GetVersionString() override;
76 void OnEnvironmentUpdate(std::string* serialized_environment) override; 79 void OnEnvironmentUpdate(std::string* serialized_environment) override;
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 // Whether this client has already uploaded profiler data during this session. 250 // Whether this client has already uploaded profiler data during this session.
248 // Profiler data is uploaded at most once per session. 251 // Profiler data is uploaded at most once per session.
249 bool has_uploaded_profiler_data_; 252 bool has_uploaded_profiler_data_;
250 253
251 base::WeakPtrFactory<ChromeMetricsServiceClient> weak_ptr_factory_; 254 base::WeakPtrFactory<ChromeMetricsServiceClient> weak_ptr_factory_;
252 255
253 DISALLOW_COPY_AND_ASSIGN(ChromeMetricsServiceClient); 256 DISALLOW_COPY_AND_ASSIGN(ChromeMetricsServiceClient);
254 }; 257 };
255 258
256 #endif // CHROME_BROWSER_METRICS_CHROME_METRICS_SERVICE_CLIENT_H_ 259 #endif // CHROME_BROWSER_METRICS_CHROME_METRICS_SERVICE_CLIENT_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/metrics/chrome_metrics_service_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698