Index: chrome/browser/extensions/extension_uninstall_dialog.cc |
diff --git a/chrome/browser/extensions/extension_uninstall_dialog.cc b/chrome/browser/extensions/extension_uninstall_dialog.cc |
index 01bc7cda9f34eef1988616464f1b10d44b36d2ae..5bdf96fdefc5a29263bbaaa310e4e4416442b614 100644 |
--- a/chrome/browser/extensions/extension_uninstall_dialog.cc |
+++ b/chrome/browser/extensions/extension_uninstall_dialog.cc |
@@ -7,6 +7,7 @@ |
#include "base/bind.h" |
#include "base/logging.h" |
#include "base/message_loop/message_loop.h" |
+#include "base/metrics/field_trial.h" |
#include "base/strings/utf_string_conversions.h" |
#include "chrome/browser/extensions/extension_util.h" |
#include "chrome/browser/profiles/profile.h" |
@@ -128,9 +129,20 @@ std::string ExtensionUninstallDialog::GetHeadingText() { |
} |
bool ExtensionUninstallDialog::ShouldShowReportAbuseCheckbox() const { |
- // TODO(devlin): Add a field trial for reporting abuse on uninstallation. |
- // See crbug.com/441377. |
- return false; |
+ static const char kExperimentName[] = "ExtensionUninstall.ReportAbuse"; |
+ static const char kControlGroupName[] = "Control"; |
+ static const char kShowCheckboxGroup[] = "ShowCheckbox"; |
+ // TODO(devlin): Turn on this field trial. See crbug.com/441377. |
+ scoped_refptr<base::FieldTrial> trial( |
+ base::FieldTrialList::FactoryGetFieldTrial( |
+ kExperimentName, |
+ 100, // Total probability. |
+ kControlGroupName, |
Finnur
2015/03/23 11:08:55
It is unusual to see a control group named here. U
Devlin
2015/03/23 15:43:23
I figured that the default would be the control (s
|
+ 2015, 7, 31, // End date. |
+ base::FieldTrial::ONE_TIME_RANDOMIZED, |
+ nullptr)); |
+ int experiment_group = trial->AppendGroup(kShowCheckboxGroup, 0); |
Finnur
2015/03/23 11:08:55
Don't you want this to be > 0 and remove the TODO?
Devlin
2015/03/23 15:43:23
Not quite yet - we're still waiting on UI feedback
|
+ return base::FieldTrialList::FindValue(kExperimentName) == experiment_group; |
} |
void ExtensionUninstallDialog::HandleReportAbuse() { |