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

Side by Side Diff: components/ntp_snippets/features.cc

Issue 2781603002: [Content suggestions] Add a feature to fetch favicons from a new server (Closed)
Patch Set: Add histogram.xml LoginCustomFlags entries Created 3 years, 8 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
« no previous file with comments | « components/ntp_snippets/features.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/ntp_snippets/features.h" 5 #include "components/ntp_snippets/features.h"
6 6
7 #include "base/feature_list.h" 7 #include "base/feature_list.h"
8 #include "base/memory/ptr_util.h" 8 #include "base/memory/ptr_util.h"
9 #include "base/time/clock.h" 9 #include "base/time/clock.h"
10 #include "components/ntp_snippets/category_rankers/click_based_category_ranker.h " 10 #include "components/ntp_snippets/category_rankers/click_based_category_ranker.h "
(...skipping 25 matching lines...) Expand all
36 36
37 const base::Feature kForeignSessionsSuggestionsFeature{ 37 const base::Feature kForeignSessionsSuggestionsFeature{
38 "NTPForeignSessionsSuggestions", base::FEATURE_DISABLED_BY_DEFAULT}; 38 "NTPForeignSessionsSuggestions", base::FEATURE_DISABLED_BY_DEFAULT};
39 39
40 const base::Feature kPreferAmpUrlsFeature{"NTPPreferAmpUrls", 40 const base::Feature kPreferAmpUrlsFeature{"NTPPreferAmpUrls",
41 base::FEATURE_ENABLED_BY_DEFAULT}; 41 base::FEATURE_ENABLED_BY_DEFAULT};
42 42
43 const base::Feature kCategoryRanker{"ContentSuggestionsCategoryRanker", 43 const base::Feature kCategoryRanker{"ContentSuggestionsCategoryRanker",
44 base::FEATURE_ENABLED_BY_DEFAULT}; 44 base::FEATURE_ENABLED_BY_DEFAULT};
45 45
46 const base::Feature kPublisherFaviconsFromNewServerFeature{
47 "ContentSuggestionsFaviconsFromNewServer",
48 base::FEATURE_DISABLED_BY_DEFAULT};
49
46 const char kCategoryRankerParameter[] = "category_ranker"; 50 const char kCategoryRankerParameter[] = "category_ranker";
47 const char kCategoryRankerConstantRanker[] = "constant"; 51 const char kCategoryRankerConstantRanker[] = "constant";
48 const char kCategoryRankerClickBasedRanker[] = "click_based"; 52 const char kCategoryRankerClickBasedRanker[] = "click_based";
49 53
50 CategoryRankerChoice GetSelectedCategoryRanker() { 54 CategoryRankerChoice GetSelectedCategoryRanker() {
51 std::string category_ranker_value = 55 std::string category_ranker_value =
52 variations::GetVariationParamValueByFeature(kCategoryRanker, 56 variations::GetVariationParamValueByFeature(kCategoryRanker,
53 kCategoryRankerParameter); 57 kCategoryRankerParameter);
54 58
55 if (category_ranker_value.empty()) { 59 if (category_ranker_value.empty()) {
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 if (category_order_value == kCategoryOrderEmergingMarketsOriented) { 113 if (category_order_value == kCategoryOrderEmergingMarketsOriented) {
110 return CategoryOrderChoice::EMERGING_MARKETS_ORIENTED; 114 return CategoryOrderChoice::EMERGING_MARKETS_ORIENTED;
111 } 115 }
112 116
113 LOG(DFATAL) << "The " << kCategoryOrderParameter << " parameter value is '" 117 LOG(DFATAL) << "The " << kCategoryOrderParameter << " parameter value is '"
114 << category_order_value << "'"; 118 << category_order_value << "'";
115 return CategoryOrderChoice::GENERAL; 119 return CategoryOrderChoice::GENERAL;
116 } 120 }
117 121
118 } // namespace ntp_snippets 122 } // namespace ntp_snippets
OLDNEW
« no previous file with comments | « components/ntp_snippets/features.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698