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

Side by Side Diff: components/ntp_snippets/remote/ntp_snippets_json_request.cc

Issue 2637183002: [NTP Snippets Fetcher] Enable sending info from LanguageModel by default (Closed)
Patch Set: Created 3 years, 11 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 | « no previous file | no next file » | 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/remote/ntp_snippets_json_request.h" 5 #include "components/ntp_snippets/remote/ntp_snippets_json_request.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 return 2; 65 return 2;
66 } 66 }
67 return std::max(0, variations::GetVariationParamByFeatureAsInt( 67 return std::max(0, variations::GetVariationParamByFeatureAsInt(
68 ntp_snippets::kArticleSuggestionsFeature, 68 ntp_snippets::kArticleSuggestionsFeature,
69 kBackground5xxRetriesName, 0)); 69 kBackground5xxRetriesName, 0));
70 } 70 }
71 71
72 bool IsSendingTopLanguagesEnabled() { 72 bool IsSendingTopLanguagesEnabled() {
73 return variations::GetVariationParamByFeatureAsBool( 73 return variations::GetVariationParamByFeatureAsBool(
74 ntp_snippets::kArticleSuggestionsFeature, kSendTopLanguagesName, 74 ntp_snippets::kArticleSuggestionsFeature, kSendTopLanguagesName,
75 /*default_value=*/false); 75 /*default_value=*/true);
76 } 76 }
77 77
78 bool IsSendingUserClassEnabled() { 78 bool IsSendingUserClassEnabled() {
79 return variations::GetVariationParamByFeatureAsBool( 79 return variations::GetVariationParamByFeatureAsBool(
80 ntp_snippets::kArticleSuggestionsFeature, kSendUserClassName, 80 ntp_snippets::kArticleSuggestionsFeature, kSendUserClassName,
81 /*default_value=*/false); 81 /*default_value=*/false);
82 } 82 }
83 83
84 // Translate the BCP 47 |language_code| into a posix locale string. 84 // Translate the BCP 47 |language_code| into a posix locale string.
85 std::string PosixLocaleFromBCP47Language(const std::string& language_code) { 85 std::string PosixLocaleFromBCP47Language(const std::string& language_code) {
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after
515 "NewTabPage.Languages.UILanguageRatioInTwoTopLanguages", 515 "NewTabPage.Languages.UILanguageRatioInTwoTopLanguages",
516 ratio_ui_in_both_languages * 100); 516 ratio_ui_in_both_languages * 100);
517 break; 517 break;
518 } 518 }
519 } 519 }
520 } 520 }
521 521
522 } // namespace internal 522 } // namespace internal
523 523
524 } // namespace ntp_snippets 524 } // namespace ntp_snippets
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698