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

Side by Side Diff: chrome/browser/about_flags.cc

Issue 1899433002: Update flags used by offline pages and bookmarks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
OLDNEW
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 26 matching lines...) Expand all
37 #include "components/browser_sync/common/browser_sync_switches.h" 37 #include "components/browser_sync/common/browser_sync_switches.h"
38 #include "components/cloud_devices/common/cloud_devices_switches.h" 38 #include "components/cloud_devices/common/cloud_devices_switches.h"
39 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_switc hes.h" 39 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_switc hes.h"
40 #include "components/dom_distiller/core/dom_distiller_switches.h" 40 #include "components/dom_distiller/core/dom_distiller_switches.h"
41 #include "components/error_page/common/error_page_switches.h" 41 #include "components/error_page/common/error_page_switches.h"
42 #include "components/flags_ui/feature_entry_macros.h" 42 #include "components/flags_ui/feature_entry_macros.h"
43 #include "components/flags_ui/flags_storage.h" 43 #include "components/flags_ui/flags_storage.h"
44 #include "components/flags_ui/flags_ui_switches.h" 44 #include "components/flags_ui/flags_ui_switches.h"
45 #include "components/nacl/common/nacl_switches.h" 45 #include "components/nacl/common/nacl_switches.h"
46 #include "components/offline_pages/offline_page_feature.h" 46 #include "components/offline_pages/offline_page_feature.h"
47 #include "components/offline_pages/offline_page_switches.h"
48 #include "components/omnibox/browser/omnibox_switches.h" 47 #include "components/omnibox/browser/omnibox_switches.h"
49 #include "components/password_manager/core/common/password_manager_features.h" 48 #include "components/password_manager/core/common/password_manager_features.h"
50 #include "components/proximity_auth/switches.h" 49 #include "components/proximity_auth/switches.h"
51 #include "components/quirks/switches.h" 50 #include "components/quirks/switches.h"
52 #include "components/search/search_switches.h" 51 #include "components/search/search_switches.h"
53 #include "components/security_state/switches.h" 52 #include "components/security_state/switches.h"
54 #include "components/signin/core/common/signin_switches.h" 53 #include "components/signin/core/common/signin_switches.h"
55 #include "components/sync_driver/sync_driver_switches.h" 54 #include "components/sync_driver/sync_driver_switches.h"
56 #include "components/tracing/tracing_switches.h" 55 #include "components/tracing/tracing_switches.h"
57 #include "components/version_info/version_info.h" 56 #include "components/version_info/version_info.h"
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after
479 {IDS_FLAGS_UPDATE_MENU_ITEM_DEFAULT_SUMMARY, 478 {IDS_FLAGS_UPDATE_MENU_ITEM_DEFAULT_SUMMARY,
480 switches::kForceShowUpdateMenuItemSummary, ""}, 479 switches::kForceShowUpdateMenuItemSummary, ""},
481 {IDS_FLAGS_UPDATE_MENU_ITEM_NEW_FEATURES_SUMMARY, 480 {IDS_FLAGS_UPDATE_MENU_ITEM_NEW_FEATURES_SUMMARY,
482 switches::kForceShowUpdateMenuItemNewFeaturesSummary, ""}, 481 switches::kForceShowUpdateMenuItemNewFeaturesSummary, ""},
483 {IDS_FLAGS_UPDATE_MENU_ITEM_CUSTOM_SUMMARY, 482 {IDS_FLAGS_UPDATE_MENU_ITEM_CUSTOM_SUMMARY,
484 switches::kForceShowUpdateMenuItemCustomSummary, "Custom summary"}, 483 switches::kForceShowUpdateMenuItemCustomSummary, "Custom summary"},
485 }; 484 };
486 #endif // defined(OS_ANDROID) 485 #endif // defined(OS_ANDROID)
487 486
488 #if defined(OS_ANDROID) 487 #if defined(OS_ANDROID)
489 const FeatureEntry::Choice kEnableOfflinePagesChoices[] = {
490 {IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", ""},
491 {IDS_FLAGS_ENABLE_OFFLINE_PAGES_AS_BOOKMARKS,
492 switches::kEnableOfflinePagesAsBookmarks, ""},
493 {IDS_FLAGS_ENABLE_OFFLINE_PAGES_AS_SAVED_PAGES,
494 switches::kEnableOfflinePagesAsSavedPages, ""},
495 {IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, switches::kDisableOfflinePages,
496 ""},
497 };
498
499 const FeatureEntry::Choice kHerbPrototypeChoices[] = { 488 const FeatureEntry::Choice kHerbPrototypeChoices[] = {
500 {IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", ""}, 489 {IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", ""},
501 {IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, 490 {IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
502 switches::kTabManagementExperimentTypeDisabled, ""}, 491 switches::kTabManagementExperimentTypeDisabled, ""},
503 {IDS_FLAGS_HERB_PROTOTYPE_FLAVOR_ANISE, 492 {IDS_FLAGS_HERB_PROTOTYPE_FLAVOR_ANISE,
504 switches::kTabManagementExperimentTypeAnise, ""}, 493 switches::kTabManagementExperimentTypeAnise, ""},
505 {IDS_FLAGS_HERB_PROTOTYPE_FLAVOR_BASIL, 494 {IDS_FLAGS_HERB_PROTOTYPE_FLAVOR_BASIL,
506 switches::kTabManagementExperimentTypeBasil, ""}, 495 switches::kTabManagementExperimentTypeBasil, ""},
507 {IDS_FLAGS_HERB_PROTOTYPE_FLAVOR_CHIVE, 496 {IDS_FLAGS_HERB_PROTOTYPE_FLAVOR_CHIVE,
508 switches::kTabManagementExperimentTypeChive, ""}, 497 switches::kTabManagementExperimentTypeChive, ""},
(...skipping 1063 matching lines...) Expand 10 before | Expand all | Expand 10 after
1572 {"experimental-keyboard-lock-ui", 1561 {"experimental-keyboard-lock-ui",
1573 IDS_FLAGS_EXPERIMENTAL_KEYBOARD_LOCK_UI_NAME, 1562 IDS_FLAGS_EXPERIMENTAL_KEYBOARD_LOCK_UI_NAME,
1574 IDS_FLAGS_EXPERIMENTAL_KEYBOARD_LOCK_UI_DESCRIPTION, kOsDesktop, 1563 IDS_FLAGS_EXPERIMENTAL_KEYBOARD_LOCK_UI_DESCRIPTION, kOsDesktop,
1575 FEATURE_VALUE_TYPE(features::kExperimentalKeyboardLockUI)}, 1564 FEATURE_VALUE_TYPE(features::kExperimentalKeyboardLockUI)},
1576 #if defined(OS_ANDROID) 1565 #if defined(OS_ANDROID)
1577 {"progress-bar-animation", IDS_FLAGS_PROGRESS_BAR_ANIMATION_NAME, 1566 {"progress-bar-animation", IDS_FLAGS_PROGRESS_BAR_ANIMATION_NAME,
1578 IDS_FLAGS_PROGRESS_BAR_ANIMATION_DESCRIPTION, kOsAndroid, 1567 IDS_FLAGS_PROGRESS_BAR_ANIMATION_DESCRIPTION, kOsAndroid,
1579 MULTI_VALUE_TYPE(kProgressBarAnimationChoices)}, 1568 MULTI_VALUE_TYPE(kProgressBarAnimationChoices)},
1580 #endif // defined(OS_ANDROID) 1569 #endif // defined(OS_ANDROID)
1581 #if defined(OS_ANDROID) 1570 #if defined(OS_ANDROID)
1582 {"offline-pages-mode", IDS_FLAGS_OFFLINE_PAGES_NAME, 1571 {"offline-bookmarks", IDS_FLAGS_OFFLINE_BOOKMARKS_NAME,
1583 IDS_FLAGS_OFFLINE_PAGES_DESCRIPTION, kOsAndroid, 1572 IDS_FLAGS_OFFLINE_BOOKMARKS_DESCRIPTION, kOsAndroid,
1584 MULTI_VALUE_TYPE(kEnableOfflinePagesChoices)}, 1573 FEATURE_VALUE_TYPE(offline_pages::kOfflineBookmarksFeature)},
1585 {"offline-pages-background-loading", 1574 {"offline-pages-background-loading",
1586 IDS_FLAGS_OFFLINE_PAGES_BACKGROUND_LOADING_NAME, 1575 IDS_FLAGS_OFFLINE_PAGES_BACKGROUND_LOADING_NAME,
1587 IDS_FLAGS_OFFLINE_PAGES_BACKGROUND_LOADING_DESCRIPTION, kOsAndroid, 1576 IDS_FLAGS_OFFLINE_PAGES_BACKGROUND_LOADING_DESCRIPTION, kOsAndroid,
1588 FEATURE_VALUE_TYPE(offline_pages::kOfflinePagesBackgroundLoadingFeature)}, 1577 FEATURE_VALUE_TYPE(offline_pages::kOfflinePagesBackgroundLoadingFeature)},
1589 #endif // defined(OS_ANDROID) 1578 #endif // defined(OS_ANDROID)
1590 {"disallow-doc-written-script-loads", 1579 {"disallow-doc-written-script-loads",
1591 IDS_FLAGS_DISALLOW_DOC_WRITTEN_SCRIPTS_UI_NAME, 1580 IDS_FLAGS_DISALLOW_DOC_WRITTEN_SCRIPTS_UI_NAME,
1592 IDS_FLAGS_DISALLOW_DOC_WRITTEN_SCRIPTS_UI_DESCRIPTION, kOsAll, 1581 IDS_FLAGS_DISALLOW_DOC_WRITTEN_SCRIPTS_UI_DESCRIPTION, kOsAll,
1593 // NOTE: if we want to add additional experiment entries for other 1582 // NOTE: if we want to add additional experiment entries for other
1594 // features controlled by kBlinkSettings, we'll need to add logic to 1583 // features controlled by kBlinkSettings, we'll need to add logic to
(...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after
2020 const base::HistogramBase::Sample kBadSwitchFormatHistogramId = 0; 2009 const base::HistogramBase::Sample kBadSwitchFormatHistogramId = 0;
2021 2010
2022 const FeatureEntry* GetFeatureEntries(size_t* count) { 2011 const FeatureEntry* GetFeatureEntries(size_t* count) {
2023 *count = arraysize(kFeatureEntries); 2012 *count = arraysize(kFeatureEntries);
2024 return kFeatureEntries; 2013 return kFeatureEntries;
2025 } 2014 }
2026 2015
2027 } // namespace testing 2016 } // namespace testing
2028 2017
2029 } // namespace about_flags 2018 } // namespace about_flags
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698