Index: chrome/browser/ui/browser.cc |
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc |
index 4e3d14f1c59722d8280c92501770142e18220ca3..c13622b82d31d5fead2cee4b3939d1e5854a2b04 100644 |
--- a/chrome/browser/ui/browser.cc |
+++ b/chrome/browser/ui/browser.cc |
@@ -474,8 +474,10 @@ Browser* Browser::CreateForApp(Type type, |
RegisterAppPrefs(app_name, profile); |
+#if !defined(OS_CHROMEOS) || defined(USE_AURA) |
if (type == TYPE_PANEL && |
- CommandLine::ForCurrentProcess()->HasSwitch(switches::kDisablePanels)) { |
+ !PanelManager::ShouldUsePanels( |
+ web_app::GetExtensionIdFromApplicationName(app_name))) { |
type = TYPE_POPUP; |
} |
#if defined(TOOLKIT_GTK) |
@@ -491,6 +493,7 @@ Browser* Browser::CreateForApp(Type type, |
} |
} |
#endif // TOOLKIT_GTK |
+#endif // !OS_CHROMEOS || USE_AURA |
CreateParams params(type, profile); |
params.app_name = app_name; |
@@ -4288,8 +4291,6 @@ gfx::Rect Browser::GetInstantBounds() { |
BrowserWindow* Browser::CreateBrowserWindow() { |
#if !defined(OS_CHROMEOS) || defined(USE_AURA) |
if (type_ == TYPE_PANEL) { |
- DCHECK(!CommandLine::ForCurrentProcess()->HasSwitch( |
- switches::kDisablePanels)); |
return PanelManager::GetInstance()->CreatePanel(this); |
} |
#endif |