| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/browser/about_flags.h" | 5 #include "chrome/browser/about_flags.h" |
| 6 | 6 |
| 7 #include <iterator> | 7 #include <iterator> |
| 8 #include <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 506 {IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, switches::kNtpSwitchToExistingTab, | 506 {IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, switches::kNtpSwitchToExistingTab, |
| 507 "disabled"}, | 507 "disabled"}, |
| 508 {IDS_FLAGS_NTP_SWITCH_TO_EXISTING_TAB_MATCH_URL, | 508 {IDS_FLAGS_NTP_SWITCH_TO_EXISTING_TAB_MATCH_URL, |
| 509 switches::kNtpSwitchToExistingTab, "url"}, | 509 switches::kNtpSwitchToExistingTab, "url"}, |
| 510 {IDS_FLAGS_NTP_SWITCH_TO_EXISTING_TAB_MATCH_HOST, | 510 {IDS_FLAGS_NTP_SWITCH_TO_EXISTING_TAB_MATCH_HOST, |
| 511 switches::kNtpSwitchToExistingTab, "host"}, | 511 switches::kNtpSwitchToExistingTab, "host"}, |
| 512 }; | 512 }; |
| 513 #endif // defined(OS_ANDROID) | 513 #endif // defined(OS_ANDROID) |
| 514 | 514 |
| 515 #if defined(OS_ANDROID) | 515 #if defined(OS_ANDROID) |
| 516 const FeatureEntry::FeatureParam kNTPSnippetsFeatureVariationDefault[] = {}; | |
| 517 const FeatureEntry::FeatureParam kNTPSnippetsFeatureVariationOnlyPersonal[] = { | 516 const FeatureEntry::FeatureParam kNTPSnippetsFeatureVariationOnlyPersonal[] = { |
| 518 {"fetching_personalization", "personal"}, | 517 {"fetching_personalization", "personal"}, |
| 519 {"fetching_host_restrict", "off"}, | 518 {"fetching_host_restrict", "off"}, |
| 520 }; | 519 }; |
| 521 const FeatureEntry::FeatureParam | 520 const FeatureEntry::FeatureParam |
| 522 kNTPSnippetsFeatureVariationOnlyNonPersonalHostRestricted[] = { | 521 kNTPSnippetsFeatureVariationOnlyNonPersonalHostRestricted[] = { |
| 523 {"fetching_personalization", "non_personal"}, | 522 {"fetching_personalization", "non_personal"}, |
| 524 {"fetching_host_restrict", "on"}, | 523 {"fetching_host_restrict", "on"}, |
| 525 }; | 524 }; |
| 526 const FeatureEntry::FeatureParam | 525 const FeatureEntry::FeatureParam |
| 527 kNTPSnippetsFeatureVariationOnlyPersonalHostRestricted[] = { | 526 kNTPSnippetsFeatureVariationOnlyPersonalHostRestricted[] = { |
| 528 {"fetching_personalization", "personal"}, | 527 {"fetching_personalization", "personal"}, |
| 529 {"fetching_host_restrict", "on"}, | 528 {"fetching_host_restrict", "on"}, |
| 530 }; | 529 }; |
| 531 | 530 |
| 532 // TODO(jkrcal) allow for nullptr instead of the empty array. | |
| 533 const FeatureEntry::FeatureVariation kNTPSnippetsFeatureVariations[] = { | 531 const FeatureEntry::FeatureVariation kNTPSnippetsFeatureVariations[] = { |
| 534 {"", kNTPSnippetsFeatureVariationDefault, | |
| 535 0}, | |
| 536 {"only personalized", kNTPSnippetsFeatureVariationOnlyPersonal, | 532 {"only personalized", kNTPSnippetsFeatureVariationOnlyPersonal, |
| 537 arraysize(kNTPSnippetsFeatureVariationOnlyPersonal)}, | 533 arraysize(kNTPSnippetsFeatureVariationOnlyPersonal)}, |
| 538 {"only from most visited sites", | 534 {"only from most visited sites", |
| 539 kNTPSnippetsFeatureVariationOnlyNonPersonalHostRestricted, | 535 kNTPSnippetsFeatureVariationOnlyNonPersonalHostRestricted, |
| 540 arraysize(kNTPSnippetsFeatureVariationOnlyPersonal)}, | 536 arraysize(kNTPSnippetsFeatureVariationOnlyPersonal)}, |
| 541 {"only personalized from most visited sites", | 537 {"only personalized from most visited sites", |
| 542 kNTPSnippetsFeatureVariationOnlyPersonalHostRestricted, | 538 kNTPSnippetsFeatureVariationOnlyPersonalHostRestricted, |
| 543 arraysize(kNTPSnippetsFeatureVariationOnlyPersonalHostRestricted)}, | 539 arraysize(kNTPSnippetsFeatureVariationOnlyPersonalHostRestricted)}, |
| 544 }; | 540 }; |
| 545 #endif // defined(OS_ANDROID) | 541 #endif // defined(OS_ANDROID) |
| (...skipping 1617 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2163 const base::HistogramBase::Sample kBadSwitchFormatHistogramId = 0; | 2159 const base::HistogramBase::Sample kBadSwitchFormatHistogramId = 0; |
| 2164 | 2160 |
| 2165 const FeatureEntry* GetFeatureEntries(size_t* count) { | 2161 const FeatureEntry* GetFeatureEntries(size_t* count) { |
| 2166 *count = arraysize(kFeatureEntries); | 2162 *count = arraysize(kFeatureEntries); |
| 2167 return kFeatureEntries; | 2163 return kFeatureEntries; |
| 2168 } | 2164 } |
| 2169 | 2165 |
| 2170 } // namespace testing | 2166 } // namespace testing |
| 2171 | 2167 |
| 2172 } // namespace about_flags | 2168 } // namespace about_flags |
| OLD | NEW |