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

Unified Diff: chrome/browser/ui/send_feedback_experiment.cc

Issue 12490012: Send Feedback Experiment (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: -static Created 7 years, 9 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/ui/send_feedback_experiment.cc
diff --git a/chrome/browser/ui/send_feedback_experiment.cc b/chrome/browser/ui/send_feedback_experiment.cc
new file mode 100644
index 0000000000000000000000000000000000000000..a1878ef941fb79fa56d11658e0edbfa65e944a0e
--- /dev/null
+++ b/chrome/browser/ui/send_feedback_experiment.cc
@@ -0,0 +1,37 @@
+// Copyright (c) 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/ui/send_feedback_experiment.h"
+
+#include "base/command_line.h"
sky 2013/03/15 23:23:42 Doesn't seem like you need this include.
Harry McCleave 2013/03/19 03:11:32 Done.
+#include "base/metrics/field_trial.h"
+
+namespace chrome {
+namespace send_feedback_experiment {
+// Constants for Send Feedback Link Location Experiment
+const char kSendFeedbackLinkExperimentName[] =
sky 2013/03/15 23:23:42 nit: newline between 11/12.
Harry McCleave 2013/03/19 03:11:32 Done.
+ "SendFeedbackLinkLocation";
+const char kSendFeedbackLinkExperimentAltText[] = "alt-text";
+const char kSendFeedbackLinkExperimentAltLocation[] = "alt-location";
+const char kSendFeedbackLinkExperimentAltTextAndLocation[] =
+ "alt-text-and-location";
+
+bool UseAlternateText() {
+ return base::FieldTrialList::TrialExists(kSendFeedbackLinkExperimentName) &&
+ (base::FieldTrialList::FindFullName(kSendFeedbackLinkExperimentName) ==
+ kSendFeedbackLinkExperimentAltText ||
+ base::FieldTrialList::FindFullName(kSendFeedbackLinkExperimentName) ==
+ kSendFeedbackLinkExperimentAltTextAndLocation);
+}
+
+bool UseAlternateLocation() {
+ return base::FieldTrialList::TrialExists(kSendFeedbackLinkExperimentName) &&
+ (base::FieldTrialList::FindFullName(kSendFeedbackLinkExperimentName) ==
+ kSendFeedbackLinkExperimentAltLocation ||
+ base::FieldTrialList::FindFullName(kSendFeedbackLinkExperimentName) ==
+ kSendFeedbackLinkExperimentAltTextAndLocation);
+}
+
+} // send_feedback_experiment
+} // chrome

Powered by Google App Engine
This is Rietveld 408576698