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

Unified Diff: chrome/browser/metrics/chrome_metrics_service_accessor.h

Issue 421653005: Adding synthetic field trial for DataReductionProxyEnabled (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@newPltWithCL
Patch Set: Addressed asvitkine comments Created 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/metrics/chrome_metrics_service_accessor.h
diff --git a/chrome/browser/metrics/chrome_metrics_service_accessor.h b/chrome/browser/metrics/chrome_metrics_service_accessor.h
index a891f27c5e62918a717675e74c2cd1b2d170903c..70d926f6233d8957906941ea3658f66f400cd94d 100644
--- a/chrome/browser/metrics/chrome_metrics_service_accessor.h
+++ b/chrome/browser/metrics/chrome_metrics_service_accessor.h
@@ -5,6 +5,8 @@
#ifndef CHROME_BROWSER_METRICS_CHROME_METRICS_SERVICE_ACCESSOR_H_
#define CHROME_BROWSER_METRICS_CHROME_METRICS_SERVICE_ACCESSOR_H_
+#include <string>
+
#include "base/gtest_prod_util.h"
#include "base/macros.h"
#include "chrome/browser/metrics/metrics_service_accessor.h"
@@ -40,6 +42,7 @@ class ChromeMetricsServiceAccessor : public MetricsServiceAccessor {
friend class ::ChromeBrowserMetricsServiceObserver;
friend class ChromeRenderMessageFilter;
friend class ::CrashesDOMHandler;
+ friend class DataReductionProxyChromeSettings;
friend class extensions::ExtensionDownloader;
friend class extensions::ManifestFetchData;
friend class extensions::MetricsPrivateGetIsCrashReportingEnabledFunction;
@@ -62,6 +65,15 @@ class ChromeMetricsServiceAccessor : public MetricsServiceAccessor {
// IsMetricsReportingEnabled for desktop Chrome.
static bool IsCrashReportingEnabled();
+ // Registers a field trial name and group to be used to annotate a UMA report
+ // with a particular Chrome configuration state. A UMA report will be
+ // annotated with this trial group if and only if all events in the report
+ // were created after the trial is registered. Only one group name may be
+ // registered at a time for a given trial_name. Only the last group name that
+ // is registered for a given trial name will be recorded. The values passed
+ // in must not correspond to any real field trial in the code.
+ static void RegisterSyntheticFieldTrial(std::string trial, std::string group);
bengr 2014/07/30 19:08:22 Can these be const std::string&?
megjablon 2014/07/30 21:27:07 Yes. Done.
+
DISALLOW_IMPLICIT_CONSTRUCTORS(ChromeMetricsServiceAccessor);
};

Powered by Google App Engine
This is Rietveld 408576698