| 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..1b2c82ee950b3bf9301efa36c3dee6efcc8fc8f9
|
| --- /dev/null
|
| +++ b/chrome/browser/ui/send_feedback_experiment.cc
|
| @@ -0,0 +1,42 @@
|
| +// 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/metrics/field_trial.h"
|
| +#include "grit/generated_resources.h"
|
| +
|
| +namespace chrome {
|
| +
|
| +namespace send_feedback_experiment {
|
| +
|
| +// Constants for Send Feedback Link Location Experiment
|
| +const char kSendFeedbackLinkExperimentName[] =
|
| + "SendFeedbackLinkLocation";
|
| +const char kSendFeedbackLinkExperimentAltText[] = "alt-text";
|
| +const char kSendFeedbackLinkExperimentAltLocation[] = "alt-location";
|
| +const char kSendFeedbackLinkExperimentAltTextAndLocation[] =
|
| + "alt-text-and-location";
|
| +
|
| +bool UseAlternateText() {
|
| + std::string trial_name =
|
| + base::FieldTrialList::FindFullName(kSendFeedbackLinkExperimentName);
|
| + return trial_name == kSendFeedbackLinkExperimentAltText ||
|
| + trial_name == kSendFeedbackLinkExperimentAltTextAndLocation;
|
| +}
|
| +
|
| +bool UseAlternateLocation() {
|
| + std::string trial_name =
|
| + base::FieldTrialList::FindFullName(kSendFeedbackLinkExperimentName);
|
| + return trial_name == kSendFeedbackLinkExperimentAltLocation ||
|
| + trial_name == kSendFeedbackLinkExperimentAltTextAndLocation;
|
| +}
|
| +
|
| +int GetMenuLabelID() {
|
| + return UseAlternateText() ? IDS_FEEDBACK_ALT : IDS_FEEDBACK;
|
| +}
|
| +
|
| +} // namespace send_feedback_experiment
|
| +
|
| +} // namespace chrome
|
|
|