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

Unified Diff: components/metrics/file_metrics_provider.cc

Issue 2524363003: Support experiment configurations with/without stability metrics. (Closed)
Patch Set: addressed review comments by Alexei Created 4 years, 1 month 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
« no previous file with comments | « components/metrics/file_metrics_provider.h ('k') | components/metrics/metrics_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/metrics/file_metrics_provider.cc
diff --git a/components/metrics/file_metrics_provider.cc b/components/metrics/file_metrics_provider.cc
index aa81a0cd1f02c55dd7255bc17711c9323213dafe..f7f0b5e949e491644fa4a995178b27d0e298a6a3 100644
--- a/components/metrics/file_metrics_provider.cc
+++ b/components/metrics/file_metrics_provider.cc
@@ -106,6 +106,8 @@ struct FileMetricsProvider::SourceInfo {
DISALLOW_COPY_AND_ASSIGN(SourceInfo);
};
+bool FileMetricsProvider::stability_metrics_enabled_ = true;
+
FileMetricsProvider::FileMetricsProvider(
const scoped_refptr<base::TaskRunner>& task_runner,
PrefService* local_state)
@@ -470,6 +472,8 @@ void FileMetricsProvider::OnDidCreateMetricsLog() {
bool FileMetricsProvider::HasInitialStabilityMetrics() {
DCHECK(thread_checker_.CalledOnValidThread());
+ if (!stability_metrics_enabled_)
Alexei Svitkine (slow) 2016/11/25 19:44:42 Instead of the extra boolean, why not check the pa
bcwhite 2016/11/28 15:35:46 I could. I thought it would be better to keep exp
Alexei Svitkine (slow) 2016/11/28 16:08:49 All other things being equal, I agree. However, h
bcwhite 2016/11/29 19:09:07 Done.
+ return false;
// Measure the total time spent checking all sources as well as the time
// per individual file. This method is called during startup and thus blocks
« no previous file with comments | « components/metrics/file_metrics_provider.h ('k') | components/metrics/metrics_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698