| 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 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 498 {IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", ""}, | 498 {IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", ""}, |
| 499 {IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, switches::kNtpSwitchToExistingTab, | 499 {IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, switches::kNtpSwitchToExistingTab, |
| 500 "disabled"}, | 500 "disabled"}, |
| 501 {IDS_FLAGS_NTP_SWITCH_TO_EXISTING_TAB_MATCH_URL, | 501 {IDS_FLAGS_NTP_SWITCH_TO_EXISTING_TAB_MATCH_URL, |
| 502 switches::kNtpSwitchToExistingTab, "url"}, | 502 switches::kNtpSwitchToExistingTab, "url"}, |
| 503 {IDS_FLAGS_NTP_SWITCH_TO_EXISTING_TAB_MATCH_HOST, | 503 {IDS_FLAGS_NTP_SWITCH_TO_EXISTING_TAB_MATCH_HOST, |
| 504 switches::kNtpSwitchToExistingTab, "host"}, | 504 switches::kNtpSwitchToExistingTab, "host"}, |
| 505 }; | 505 }; |
| 506 #endif // OS_ANDROID | 506 #endif // OS_ANDROID |
| 507 | 507 |
| 508 #if defined(OS_CHROMEOS) |
| 509 const FeatureEntry::Choice kForceTabletModeChoices[] = { |
| 510 {IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", ""}, |
| 511 {IDS_FLAGS_FORCE_TABLET_MODE_TOUCHVIEW, switches::kForceTabletMode, |
| 512 switches::kForceTabletModeTouchView}, |
| 513 {IDS_FLAGS_FORCE_TABLET_MODE_CLAMSHELL, switches::kForceTabletMode, |
| 514 switches::kForceTabletModeClamshell}, |
| 515 {IDS_FLAGS_FORCE_TABLET_MODE_AUTO, switches::kForceTabletMode, |
| 516 switches::kForceTabletModeAuto}, |
| 517 }; |
| 518 #endif // OS_CHROMEOS |
| 519 |
| 508 #if defined(OS_ANDROID) | 520 #if defined(OS_ANDROID) |
| 509 const FeatureEntry::FeatureParam | 521 const FeatureEntry::FeatureParam |
| 510 kContentSuggestionsCategoryOrderFeatureVariationGeneral[] = { | 522 kContentSuggestionsCategoryOrderFeatureVariationGeneral[] = { |
| 511 {ntp_snippets::kCategoryOrderParameter, | 523 {ntp_snippets::kCategoryOrderParameter, |
| 512 ntp_snippets::kCategoryOrderGeneral}, | 524 ntp_snippets::kCategoryOrderGeneral}, |
| 513 }; | 525 }; |
| 514 | 526 |
| 515 const FeatureEntry::FeatureParam | 527 const FeatureEntry::FeatureParam |
| 516 kContentSuggestionsCategoryOrderFeatureVariationEMOriented[] = { | 528 kContentSuggestionsCategoryOrderFeatureVariationEMOriented[] = { |
| 517 {ntp_snippets::kCategoryOrderParameter, | 529 {ntp_snippets::kCategoryOrderParameter, |
| (...skipping 1849 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2367 {"enable-chromevox-arc-support", | 2379 {"enable-chromevox-arc-support", |
| 2368 IDS_FLAGS_ENABLE_CHROMEVOX_ARC_SUPPORT_NAME, | 2380 IDS_FLAGS_ENABLE_CHROMEVOX_ARC_SUPPORT_NAME, |
| 2369 IDS_FLAGS_ENABLE_CHROMEVOX_ARC_SUPPORT_DESCRIPTION, kOsCrOS, | 2381 IDS_FLAGS_ENABLE_CHROMEVOX_ARC_SUPPORT_DESCRIPTION, kOsCrOS, |
| 2370 SINGLE_VALUE_TYPE(chromeos::switches::kEnableChromeVoxArcSupport)}, | 2382 SINGLE_VALUE_TYPE(chromeos::switches::kEnableChromeVoxArcSupport)}, |
| 2371 #endif // defined(OS_CHROMEOS) | 2383 #endif // defined(OS_CHROMEOS) |
| 2372 | 2384 |
| 2373 {"enable-mojo-loading", IDS_FLAGS_MOJO_LOADING_NAME, | 2385 {"enable-mojo-loading", IDS_FLAGS_MOJO_LOADING_NAME, |
| 2374 IDS_FLAGS_MOJO_LOADING_DESCRIPTION, kOsAll, | 2386 IDS_FLAGS_MOJO_LOADING_DESCRIPTION, kOsAll, |
| 2375 FEATURE_VALUE_TYPE(features::kLoadingWithMojo)}, | 2387 FEATURE_VALUE_TYPE(features::kLoadingWithMojo)}, |
| 2376 | 2388 |
| 2389 #if defined(OS_CHROMEOS) |
| 2390 {"force-tablet-mode", IDS_FLAGS_FORCE_TABLET_MODE_NAME, |
| 2391 IDS_FLAGS_FORCE_TABLET_MODE_DESCRIPTION, kOsCrOS, |
| 2392 MULTI_VALUE_TYPE(kForceTabletModeChoices)}, |
| 2393 #endif // OS_CHROMEOS |
| 2394 |
| 2377 // NOTE: Adding new command-line switches requires adding corresponding | 2395 // NOTE: Adding new command-line switches requires adding corresponding |
| 2378 // entries to enum "LoginCustomFlags" in histograms.xml. See note in | 2396 // entries to enum "LoginCustomFlags" in histograms.xml. See note in |
| 2379 // histograms.xml and don't forget to run AboutFlagsHistogramTest unit test. | 2397 // histograms.xml and don't forget to run AboutFlagsHistogramTest unit test. |
| 2380 }; | 2398 }; |
| 2381 | 2399 |
| 2382 class FlagsStateSingleton { | 2400 class FlagsStateSingleton { |
| 2383 public: | 2401 public: |
| 2384 FlagsStateSingleton() | 2402 FlagsStateSingleton() |
| 2385 : flags_state_(kFeatureEntries, arraysize(kFeatureEntries)) {} | 2403 : flags_state_(kFeatureEntries, arraysize(kFeatureEntries)) {} |
| 2386 ~FlagsStateSingleton() {} | 2404 ~FlagsStateSingleton() {} |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2575 const base::HistogramBase::Sample kBadSwitchFormatHistogramId = 0; | 2593 const base::HistogramBase::Sample kBadSwitchFormatHistogramId = 0; |
| 2576 | 2594 |
| 2577 const FeatureEntry* GetFeatureEntries(size_t* count) { | 2595 const FeatureEntry* GetFeatureEntries(size_t* count) { |
| 2578 *count = arraysize(kFeatureEntries); | 2596 *count = arraysize(kFeatureEntries); |
| 2579 return kFeatureEntries; | 2597 return kFeatureEntries; |
| 2580 } | 2598 } |
| 2581 | 2599 |
| 2582 } // namespace testing | 2600 } // namespace testing |
| 2583 | 2601 |
| 2584 } // namespace about_flags | 2602 } // namespace about_flags |
| OLD | NEW |