OLD | NEW |
---|---|
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "components/dom_distiller/core/experiments.h" | 5 #include "components/dom_distiller/core/experiments.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/metrics/field_trial.h" | 8 #include "base/metrics/field_trial.h" |
9 #include "components/dom_distiller/core/dom_distiller_switches.h" | 9 #include "components/dom_distiller/core/dom_distiller_switches.h" |
10 | 10 |
(...skipping 20 matching lines...) Expand all Loading... | |
31 } | 31 } |
32 NOTREACHED() << "Invalid value for " << switches::kReaderModeHeuristics; | 32 NOTREACHED() << "Invalid value for " << switches::kReaderModeHeuristics; |
33 } else { | 33 } else { |
34 if (group_name == "AdaBoost") { | 34 if (group_name == "AdaBoost") { |
35 return DistillerHeuristicsType::ADABOOST_MODEL; | 35 return DistillerHeuristicsType::ADABOOST_MODEL; |
36 } | 36 } |
37 if (group_name == "OGArticle") { | 37 if (group_name == "OGArticle") { |
38 return DistillerHeuristicsType::OG_ARTICLE; | 38 return DistillerHeuristicsType::OG_ARTICLE; |
39 } | 39 } |
40 } | 40 } |
41 return DistillerHeuristicsType::NONE; | 41 return DistillerHeuristicsType::ADABOOST_MODEL; |
mdjones
2016/08/05 16:59:43
Is this going to skew our groups?
wychen
2016/08/06 07:03:22
This is meant to be landed after we decide to roll
wychen
2016/08/06 21:55:09
OK, this is also wrong. Some users don't get finch
| |
42 } | 42 } |
43 | 43 |
44 bool ShouldShowFeedbackForm() { | 44 bool ShouldShowFeedbackForm() { |
45 const std::string group_name = | 45 const std::string group_name = |
46 base::FieldTrialList::FindFullName("ReaderModeUIFeedback"); | 46 base::FieldTrialList::FindFullName("ReaderModeUIFeedback"); |
47 const std::string switch_value = | 47 const std::string switch_value = |
48 base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( | 48 base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( |
49 switches::kReaderModeFeedback); | 49 switches::kReaderModeFeedback); |
50 if (switch_value != "") { | 50 if (switch_value != "") { |
51 if (switch_value == switches::reader_mode_feedback::kOn) { | 51 if (switch_value == switches::reader_mode_feedback::kOn) { |
52 return true; | 52 return true; |
53 } | 53 } |
54 if (switch_value == switches::reader_mode_feedback::kOff) { | 54 if (switch_value == switches::reader_mode_feedback::kOff) { |
55 return false; | 55 return false; |
56 } | 56 } |
57 NOTREACHED() << "Invalid value for " << switches::kReaderModeFeedback; | 57 NOTREACHED() << "Invalid value for " << switches::kReaderModeFeedback; |
58 } else { | 58 } else { |
59 if (group_name == "DoNotShow") { | 59 if (group_name == "DoNotShow") { |
60 return false; | 60 return false; |
61 } | 61 } |
62 if (group_name == "Show") { | 62 if (group_name == "Show") { |
63 return true; | 63 return true; |
64 } | 64 } |
65 } | 65 } |
66 return false; | 66 return false; |
67 } | 67 } |
68 } | 68 } |
OLD | NEW |