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

Unified Diff: components/metrics/file_metrics_provider.cc

Issue 2524363003: Support experiment configurations with/without stability metrics. (Closed)
Patch Set: move experiment check into FileMetricsProvider 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 | « no previous file | 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..33874efdd8888e9432cff317f531b8d5ab3e5f9b 100644
--- a/components/metrics/file_metrics_provider.cc
+++ b/components/metrics/file_metrics_provider.cc
@@ -22,6 +22,7 @@
#include "components/metrics/metrics_service.h"
#include "components/prefs/pref_registry_simple.h"
#include "components/prefs/pref_service.h"
+#include "components/variations/variations_associated_data.h"
namespace metrics {
@@ -471,6 +472,12 @@ void FileMetricsProvider::OnDidCreateMetricsLog() {
bool FileMetricsProvider::HasInitialStabilityMetrics() {
DCHECK(thread_checker_.CalledOnValidThread());
+ // Check if there is an experiment that disables stability metrics.
+ std::string unreported = variations::GetVariationParamValueByFeature(
+ base::kPersistentHistogramsFeature, "send_unreported_metrics");
+ if (unreported == "no")
+ sources_for_previous_run_.clear();
+
// 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
// the initial showing of the browser window so it's important to know the
« no previous file with comments | « no previous file | components/metrics/metrics_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698