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

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

Issue 1996843002: Delay PersistentHistogramAllocator creation until it's known to be used. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed review comments by Alexei Created 4 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
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 <memory> 10 #include <memory>
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 void CollectFinalMetricsForLog(const base::Closure& done_callback) override; 72 void CollectFinalMetricsForLog(const base::Closure& done_callback) override;
73 std::unique_ptr<metrics::MetricsLogUploader> CreateUploader( 73 std::unique_ptr<metrics::MetricsLogUploader> CreateUploader(
74 const base::Callback<void(int)>& on_upload_complete) override; 74 const base::Callback<void(int)>& on_upload_complete) override;
75 base::TimeDelta GetStandardUploadInterval() override; 75 base::TimeDelta GetStandardUploadInterval() override;
76 base::string16 GetRegistryBackupKey() override; 76 base::string16 GetRegistryBackupKey() override;
77 void OnPluginLoadingError(const base::FilePath& plugin_path) override; 77 void OnPluginLoadingError(const base::FilePath& plugin_path) override;
78 bool IsReportingPolicyManaged() override; 78 bool IsReportingPolicyManaged() override;
79 EnableMetricsDefault GetDefaultOptIn() override; 79 EnableMetricsDefault GetDefaultOptIn() override;
80 bool IsUMACellularUploadLogicEnabled() override; 80 bool IsUMACellularUploadLogicEnabled() override;
81 81
82 // Persistent browser metrics need to be persisted somewhere. This constant
83 // provides a known string to be used for both the allocator's internal name
84 // and for a file on disk (relative to chrome::DIR_USER_DATA) to which they
85 // can be saved.
86 static const char kBrowserMetricsName[];
87
82 private: 88 private:
83 explicit ChromeMetricsServiceClient( 89 explicit ChromeMetricsServiceClient(
84 metrics::MetricsStateManager* state_manager); 90 metrics::MetricsStateManager* state_manager);
85 91
86 // Completes the two-phase initialization of ChromeMetricsServiceClient. 92 // Completes the two-phase initialization of ChromeMetricsServiceClient.
87 void Initialize(); 93 void Initialize();
88 94
89 // Callback that continues the init task by getting a Bluetooth Adapter. 95 // Callback that continues the init task by getting a Bluetooth Adapter.
90 void OnInitTaskGotHardwareClass(); 96 void OnInitTaskGotHardwareClass();
91 97
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 // Whether this client has already uploaded profiler data during this session. 218 // Whether this client has already uploaded profiler data during this session.
213 // Profiler data is uploaded at most once per session. 219 // Profiler data is uploaded at most once per session.
214 bool has_uploaded_profiler_data_; 220 bool has_uploaded_profiler_data_;
215 221
216 base::WeakPtrFactory<ChromeMetricsServiceClient> weak_ptr_factory_; 222 base::WeakPtrFactory<ChromeMetricsServiceClient> weak_ptr_factory_;
217 223
218 DISALLOW_COPY_AND_ASSIGN(ChromeMetricsServiceClient); 224 DISALLOW_COPY_AND_ASSIGN(ChromeMetricsServiceClient);
219 }; 225 };
220 226
221 #endif // CHROME_BROWSER_METRICS_CHROME_METRICS_SERVICE_CLIENT_H_ 227 #endif // CHROME_BROWSER_METRICS_CHROME_METRICS_SERVICE_CLIENT_H_
OLDNEW
« no previous file with comments | « chrome/browser/chrome_browser_field_trials.cc ('k') | chrome/browser/metrics/chrome_metrics_service_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698