| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |