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

Unified Diff: chrome/browser/ui/panels/panel_manager.cc

Issue 1541033002: Add --disable-panels for blocking all extensions from using panels. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update histograms.xml Created 5 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/panels/panel_manager.cc
diff --git a/chrome/browser/ui/panels/panel_manager.cc b/chrome/browser/ui/panels/panel_manager.cc
index ef8a026c3a26626f638c9d19e6d7ae0494d61509..06edbb9d9932c807637ddbdbf7666b2e5b84896f 100644
--- a/chrome/browser/ui/panels/panel_manager.cc
+++ b/chrome/browser/ui/panels/panel_manager.cc
@@ -105,6 +105,11 @@ void PanelManager::SetDisplaySettingsProviderForTesting(
// static
bool PanelManager::ShouldUsePanels(const std::string& extension_id) {
+ // If --disable-panels is on, never use panels.
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kDisablePanels))
+ return false;
+
// If --enable-panels is on, always use panels.
if (base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnablePanels))
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698