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

Side by Side 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: removed duplicate constant strings 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "chrome/browser/ui/send_feedback_experiment.h"
6
7 #include "base/metrics/field_trial.h"
8 #include "grit/generated_resources.h"
9
10 namespace chrome {
11
12 namespace send_feedback_experiment {
13
14 // Constants for Send Feedback Link Location Experiment
15 const char kSendFeedbackLinkExperimentName[] =
16 "SendFeedbackLinkLocation";
17 const char kSendFeedbackLinkExperimentAltText[] = "alt-text";
18 const char kSendFeedbackLinkExperimentAltLocation[] = "alt-location";
19 const char kSendFeedbackLinkExperimentAltTextAndLocation[] =
20 "alt-text-and-location";
21
22 bool UseAlternateText() {
23 std::string trial_name =
24 base::FieldTrialList::FindFullName(kSendFeedbackLinkExperimentName);
25 return trial_name == kSendFeedbackLinkExperimentAltText ||
26 trial_name == kSendFeedbackLinkExperimentAltTextAndLocation;
27 }
28
29 bool UseAlternateLocation() {
30 std::string trial_name =
31 base::FieldTrialList::FindFullName(kSendFeedbackLinkExperimentName);
32 return trial_name == kSendFeedbackLinkExperimentAltLocation ||
33 trial_name == kSendFeedbackLinkExperimentAltTextAndLocation;
34 }
35
36 int GetMenuLabelID() {
37 return UseAlternateText() ? IDS_FEEDBACK_ALT : IDS_FEEDBACK;
38 }
39
40 } // namespace send_feedback_experiment
41
42 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698