| 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 482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 493 {IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", ""}, | 493 {IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", ""}, |
| 494 {IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, switches::kNtpSwitchToExistingTab, | 494 {IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, switches::kNtpSwitchToExistingTab, |
| 495 "disabled"}, | 495 "disabled"}, |
| 496 {IDS_FLAGS_NTP_SWITCH_TO_EXISTING_TAB_MATCH_URL, | 496 {IDS_FLAGS_NTP_SWITCH_TO_EXISTING_TAB_MATCH_URL, |
| 497 switches::kNtpSwitchToExistingTab, "url"}, | 497 switches::kNtpSwitchToExistingTab, "url"}, |
| 498 {IDS_FLAGS_NTP_SWITCH_TO_EXISTING_TAB_MATCH_HOST, | 498 {IDS_FLAGS_NTP_SWITCH_TO_EXISTING_TAB_MATCH_HOST, |
| 499 switches::kNtpSwitchToExistingTab, "host"}, | 499 switches::kNtpSwitchToExistingTab, "host"}, |
| 500 }; | 500 }; |
| 501 #endif // OS_ANDROID | 501 #endif // OS_ANDROID |
| 502 | 502 |
| 503 #if defined(OS_CHROMEOS) |
| 504 const FeatureEntry::Choice kForceTabletModeChoices[] = { |
| 505 {IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", ""}, |
| 506 {IDS_FLAGS_FORCE_TABLET_MODE_TOUCHVIEW, switches::kForceTabletMode, |
| 507 switches::kForceTabletModeTouchView}, |
| 508 {IDS_FLAGS_FORCE_TABLET_MODE_CLAMSHELL, switches::kForceTabletMode, |
| 509 switches::kForceTabletModeClamshell}, |
| 510 {IDS_FLAGS_FORCE_TABLET_MODE_AUTO, switches::kForceTabletMode, |
| 511 switches::kForceTabletModeAuto}, |
| 512 }; |
| 513 #endif // OS_CHROMEOS |
| 514 |
| 503 #if defined(OS_ANDROID) | 515 #if defined(OS_ANDROID) |
| 504 const FeatureEntry::FeatureParam | 516 const FeatureEntry::FeatureParam |
| 505 kContentSuggestionsCategoryOrderFeatureVariationGeneral[] = { | 517 kContentSuggestionsCategoryOrderFeatureVariationGeneral[] = { |
| 506 {ntp_snippets::kCategoryOrderParameter, | 518 {ntp_snippets::kCategoryOrderParameter, |
| 507 ntp_snippets::kCategoryOrderGeneral}, | 519 ntp_snippets::kCategoryOrderGeneral}, |
| 508 }; | 520 }; |
| 509 | 521 |
| 510 const FeatureEntry::FeatureParam | 522 const FeatureEntry::FeatureParam |
| 511 kContentSuggestionsCategoryOrderFeatureVariationEMOriented[] = { | 523 kContentSuggestionsCategoryOrderFeatureVariationEMOriented[] = { |
| 512 {ntp_snippets::kCategoryOrderParameter, | 524 {ntp_snippets::kCategoryOrderParameter, |
| (...skipping 1829 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2342 FEATURE_VALUE_TYPE(chrome::android::kCustomFeedbackUi)}, | 2354 FEATURE_VALUE_TYPE(chrome::android::kCustomFeedbackUi)}, |
| 2343 #endif // OS_ANDROID | 2355 #endif // OS_ANDROID |
| 2344 | 2356 |
| 2345 {"enable-resource-prefetch", IDS_FLAGS_SPECULATIVE_PREFETCH_NAME, | 2357 {"enable-resource-prefetch", IDS_FLAGS_SPECULATIVE_PREFETCH_NAME, |
| 2346 IDS_FLAGS_SPECULATIVE_PREFETCH_DESCRIPTION, kOsAll, | 2358 IDS_FLAGS_SPECULATIVE_PREFETCH_DESCRIPTION, kOsAll, |
| 2347 FEATURE_WITH_VARIATIONS_VALUE_TYPE( | 2359 FEATURE_WITH_VARIATIONS_VALUE_TYPE( |
| 2348 predictors::kSpeculativeResourcePrefetchingFeature, | 2360 predictors::kSpeculativeResourcePrefetchingFeature, |
| 2349 kSpeculativeResourcePrefetchingFeatureVariations, | 2361 kSpeculativeResourcePrefetchingFeatureVariations, |
| 2350 "SpeculativeResourcePrefetchingValidation")}, | 2362 "SpeculativeResourcePrefetchingValidation")}, |
| 2351 | 2363 |
| 2364 #if defined(OS_CHROMEOS) |
| 2365 {"force-tablet-mode", IDS_FLAGS_FORCE_TABLET_MODE_NAME, |
| 2366 IDS_FLAGS_FORCE_TABLET_MODE_DESCRIPTION, kOsCrOS, |
| 2367 MULTI_VALUE_TYPE(kForceTabletModeChoices)}, |
| 2368 #endif // OS_CHROMEOS |
| 2369 |
| 2352 // NOTE: Adding new command-line switches requires adding corresponding | 2370 // NOTE: Adding new command-line switches requires adding corresponding |
| 2353 // entries to enum "LoginCustomFlags" in histograms.xml. See note in | 2371 // entries to enum "LoginCustomFlags" in histograms.xml. See note in |
| 2354 // histograms.xml and don't forget to run AboutFlagsHistogramTest unit test. | 2372 // histograms.xml and don't forget to run AboutFlagsHistogramTest unit test. |
| 2355 }; | 2373 }; |
| 2356 | 2374 |
| 2357 class FlagsStateSingleton { | 2375 class FlagsStateSingleton { |
| 2358 public: | 2376 public: |
| 2359 FlagsStateSingleton() | 2377 FlagsStateSingleton() |
| 2360 : flags_state_(kFeatureEntries, arraysize(kFeatureEntries)) {} | 2378 : flags_state_(kFeatureEntries, arraysize(kFeatureEntries)) {} |
| 2361 ~FlagsStateSingleton() {} | 2379 ~FlagsStateSingleton() {} |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2550 const base::HistogramBase::Sample kBadSwitchFormatHistogramId = 0; | 2568 const base::HistogramBase::Sample kBadSwitchFormatHistogramId = 0; |
| 2551 | 2569 |
| 2552 const FeatureEntry* GetFeatureEntries(size_t* count) { | 2570 const FeatureEntry* GetFeatureEntries(size_t* count) { |
| 2553 *count = arraysize(kFeatureEntries); | 2571 *count = arraysize(kFeatureEntries); |
| 2554 return kFeatureEntries; | 2572 return kFeatureEntries; |
| 2555 } | 2573 } |
| 2556 | 2574 |
| 2557 } // namespace testing | 2575 } // namespace testing |
| 2558 | 2576 |
| 2559 } // namespace about_flags | 2577 } // namespace about_flags |
| OLD | NEW |