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

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

Issue 1772233003: Flag for Background Loading of Offline Pages. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 510 matching lines...) Expand 10 before | Expand all | Expand 10 after
521 const FeatureEntry::Choice kEnableOfflinePagesChoices[] = { 521 const FeatureEntry::Choice kEnableOfflinePagesChoices[] = {
522 {IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", ""}, 522 {IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", ""},
523 {IDS_FLAGS_ENABLE_OFFLINE_PAGES_AS_BOOKMARKS, 523 {IDS_FLAGS_ENABLE_OFFLINE_PAGES_AS_BOOKMARKS,
524 switches::kEnableOfflinePagesAsBookmarks, ""}, 524 switches::kEnableOfflinePagesAsBookmarks, ""},
525 {IDS_FLAGS_ENABLE_OFFLINE_PAGES_AS_SAVED_PAGES, 525 {IDS_FLAGS_ENABLE_OFFLINE_PAGES_AS_SAVED_PAGES,
526 switches::kEnableOfflinePagesAsSavedPages, ""}, 526 switches::kEnableOfflinePagesAsSavedPages, ""},
527 {IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, switches::kDisableOfflinePages, 527 {IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, switches::kDisableOfflinePages,
528 ""}, 528 ""},
529 }; 529 };
530 530
531 const FeatureEntry::Choice kEnableOfflinePagesBackgroundLoadingChoices[] = {
532 {IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", ""},
533 {IDS_FLAGS_ENABLE_OFFLINE_PAGES_BACKGROUND_LOADING,
534 switches::kEnableOfflinePagesAsBookmarks, ""},
fgorski 2016/03/09 18:00:04 ??
Pete Williamson 2016/03/09 20:36:32 fixed the copy-paste bug with the switch name
535 {IDS_FLAGS_DISABLE_OFFLINE_PAGES_BACKGROUND_LOADING,
536 switches::kEnableOfflinePagesAsSavedPages, ""},
fgorski 2016/03/09 18:00:04 ??
Pete Williamson 2016/03/09 20:36:32 Done.
537 };
538
531 const FeatureEntry::Choice kHerbPrototypeChoices[] = { 539 const FeatureEntry::Choice kHerbPrototypeChoices[] = {
532 {IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", ""}, 540 {IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", ""},
533 {IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, 541 {IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
534 switches::kTabManagementExperimentTypeDisabled, ""}, 542 switches::kTabManagementExperimentTypeDisabled, ""},
535 {IDS_FLAGS_HERB_PROTOTYPE_FLAVOR_ANISE, 543 {IDS_FLAGS_HERB_PROTOTYPE_FLAVOR_ANISE,
536 switches::kTabManagementExperimentTypeAnise, ""}, 544 switches::kTabManagementExperimentTypeAnise, ""},
537 {IDS_FLAGS_HERB_PROTOTYPE_FLAVOR_BASIL, 545 {IDS_FLAGS_HERB_PROTOTYPE_FLAVOR_BASIL,
538 switches::kTabManagementExperimentTypeBasil, ""}, 546 switches::kTabManagementExperimentTypeBasil, ""},
539 {IDS_FLAGS_HERB_PROTOTYPE_FLAVOR_CHIVE, 547 {IDS_FLAGS_HERB_PROTOTYPE_FLAVOR_CHIVE,
540 switches::kTabManagementExperimentTypeChive, ""}, 548 switches::kTabManagementExperimentTypeChive, ""},
(...skipping 1070 matching lines...) Expand 10 before | Expand all | Expand 10 after
1611 #endif // defined(TOOLKIT_VIEWS) 1619 #endif // defined(TOOLKIT_VIEWS)
1612 #if defined(OS_ANDROID) 1620 #if defined(OS_ANDROID)
1613 {"progress-bar-animation", IDS_FLAGS_PROGRESS_BAR_ANIMATION_NAME, 1621 {"progress-bar-animation", IDS_FLAGS_PROGRESS_BAR_ANIMATION_NAME,
1614 IDS_FLAGS_PROGRESS_BAR_ANIMATION_DESCRIPTION, kOsAndroid, 1622 IDS_FLAGS_PROGRESS_BAR_ANIMATION_DESCRIPTION, kOsAndroid,
1615 MULTI_VALUE_TYPE(kProgressBarAnimationChoices)}, 1623 MULTI_VALUE_TYPE(kProgressBarAnimationChoices)},
1616 #endif // defined(OS_ANDROID) 1624 #endif // defined(OS_ANDROID)
1617 #if defined(OS_ANDROID) 1625 #if defined(OS_ANDROID)
1618 {"offline-pages-mode", IDS_FLAGS_OFFLINE_PAGES_NAME, 1626 {"offline-pages-mode", IDS_FLAGS_OFFLINE_PAGES_NAME,
1619 IDS_FLAGS_OFFLINE_PAGES_DESCRIPTION, kOsAndroid, 1627 IDS_FLAGS_OFFLINE_PAGES_DESCRIPTION, kOsAndroid,
1620 MULTI_VALUE_TYPE(kEnableOfflinePagesChoices)}, 1628 MULTI_VALUE_TYPE(kEnableOfflinePagesChoices)},
1629 {"offline-pages-backgorund_loading_mode",
1630 IDS_FLAGS_OFFLINE_PAGES_BACKGROUND_LOADING_NAME,
1631 IDS_FLAGS_OFFLINE_PAGES_BACKGROUND_LOADING_DESCRIPTION, kOsAndroid,
1632 MULTI_VALUE_TYPE(kEnableOfflinePagesBackgroundLoadingChoices)},
1621 #endif // defined(OS_ANDROID) 1633 #endif // defined(OS_ANDROID)
1622 {"low-priority-iframes", IDS_FLAGS_LOW_PRIORITY_IFRAMES_UI_NAME, 1634 {"low-priority-iframes", IDS_FLAGS_LOW_PRIORITY_IFRAMES_UI_NAME,
1623 IDS_FLAGS_LOW_PRIORITY_IFRAMES_UI_DESCRIPTION, kOsAll, 1635 IDS_FLAGS_LOW_PRIORITY_IFRAMES_UI_DESCRIPTION, kOsAll,
1624 // NOTE: if we want to add additional experiment entries for other 1636 // NOTE: if we want to add additional experiment entries for other
1625 // features controlled by kBlinkSettings, we'll need to add logic to 1637 // features controlled by kBlinkSettings, we'll need to add logic to
1626 // merge the flag values. 1638 // merge the flag values.
1627 SINGLE_VALUE_TYPE_AND_VALUE(switches::kBlinkSettings, 1639 SINGLE_VALUE_TYPE_AND_VALUE(switches::kBlinkSettings,
1628 "lowPriorityIframes=true")}, 1640 "lowPriorityIframes=true")},
1629 #if defined(OS_ANDROID) 1641 #if defined(OS_ANDROID)
1630 {"enable-ntp-popular-sites", IDS_FLAGS_NTP_POPULAR_SITES_NAME, 1642 {"enable-ntp-popular-sites", IDS_FLAGS_NTP_POPULAR_SITES_NAME,
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
2001 const base::HistogramBase::Sample kBadSwitchFormatHistogramId = 0; 2013 const base::HistogramBase::Sample kBadSwitchFormatHistogramId = 0;
2002 2014
2003 const FeatureEntry* GetFeatureEntries(size_t* count) { 2015 const FeatureEntry* GetFeatureEntries(size_t* count) {
2004 *count = arraysize(kFeatureEntries); 2016 *count = arraysize(kFeatureEntries);
2005 return kFeatureEntries; 2017 return kFeatureEntries;
2006 } 2018 }
2007 2019
2008 } // namespace testing 2020 } // namespace testing
2009 2021
2010 } // namespace about_flags 2022 } // namespace about_flags
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698