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

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

Issue 2805683003: Allow for pausing background tabs on desktop via about:flags. (Closed)
Patch Set: Created 3 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 2554 matching lines...) Expand 10 before | Expand all | Expand 10 after
2565 kDelayNavigationFeatureVariations, 2565 kDelayNavigationFeatureVariations,
2566 "DelayNavigation")}, 2566 "DelayNavigation")},
2567 2567
2568 #if defined(OS_ANDROID) 2568 #if defined(OS_ANDROID)
2569 {"enable-custom-context-menu", 2569 {"enable-custom-context-menu",
2570 flag_descriptions::kEnableCustomContextMenuName, 2570 flag_descriptions::kEnableCustomContextMenuName,
2571 flag_descriptions::kEnableCustomContextMenuDescription, kOsAndroid, 2571 flag_descriptions::kEnableCustomContextMenuDescription, kOsAndroid,
2572 FEATURE_VALUE_TYPE(chrome::android::kCustomContextMenu)}, 2572 FEATURE_VALUE_TYPE(chrome::android::kCustomContextMenu)},
2573 #endif // OS_ANDROID 2573 #endif // OS_ANDROID
2574 2574
2575 #if defined(OS_CHROMEOS) || defined(OS_LINUX) || defined(OS_MACOSX) || \
2576 defined(OS_WIN)
2577 {"pause-background-tabs", flag_descriptions::kPauseBackgroundTabsName,
2578 flag_descriptions::kPauseBackgroundTabsDescription, kOsDesktop,
2579 SINGLE_VALUE_TYPE(switches::kPauseBackgroundTabs)},
2580 #endif
2581
2575 // NOTE: Adding new command-line switches requires adding corresponding 2582 // NOTE: Adding new command-line switches requires adding corresponding
2576 // entries to enum "LoginCustomFlags" in histograms.xml. See note in 2583 // entries to enum "LoginCustomFlags" in histograms.xml. See note in
2577 // histograms.xml and don't forget to run AboutFlagsHistogramTest unit test. 2584 // histograms.xml and don't forget to run AboutFlagsHistogramTest unit test.
2578 }; 2585 };
2579 2586
2580 class FlagsStateSingleton { 2587 class FlagsStateSingleton {
2581 public: 2588 public:
2582 FlagsStateSingleton() 2589 FlagsStateSingleton()
2583 : flags_state_(kFeatureEntries, arraysize(kFeatureEntries)) {} 2590 : flags_state_(kFeatureEntries, arraysize(kFeatureEntries)) {}
2584 ~FlagsStateSingleton() {} 2591 ~FlagsStateSingleton() {}
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
2773 const base::HistogramBase::Sample kBadSwitchFormatHistogramId = 0; 2780 const base::HistogramBase::Sample kBadSwitchFormatHistogramId = 0;
2774 2781
2775 const FeatureEntry* GetFeatureEntries(size_t* count) { 2782 const FeatureEntry* GetFeatureEntries(size_t* count) {
2776 *count = arraysize(kFeatureEntries); 2783 *count = arraysize(kFeatureEntries);
2777 return kFeatureEntries; 2784 return kFeatureEntries;
2778 } 2785 }
2779 2786
2780 } // namespace testing 2787 } // namespace testing
2781 2788
2782 } // namespace about_flags 2789 } // namespace about_flags
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chrome_content_browser_client.cc » ('j') | chrome/browser/flag_descriptions.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698