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

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

Issue 1329033002: Disable extension Panels on Dev and Canary, except for the whitelist (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove stray Created 5 years, 3 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 side-by-side diff with in-line comments
Download patch
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 f24c597265da5035d9603f8b1e947e30d47e4355..1846ea65c5300d6f455697a41313f7db3e910375 100644
--- a/chrome/browser/ui/panels/panel_manager.cc
+++ b/chrome/browser/ui/panels/panel_manager.cc
@@ -21,6 +21,7 @@
#include "components/version_info/version_info.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_source.h"
+#include "extensions/common/constants.h"
#include "ui/base/hit_test.h"
#if defined(USE_X11) && !defined(OS_CHROMEOS)
@@ -104,13 +105,13 @@ void PanelManager::SetDisplaySettingsProviderForTesting(
// static
bool PanelManager::ShouldUsePanels(const std::string& extension_id) {
-#if defined(USE_X11) && !defined(OS_CHROMEOS)
- // If --enable-panels is on, always use panels on Linux.
+ // If --enable-panels is on, always use panels.
if (base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnablePanels))
return true;
- // Otherwise, panels are only supported on tested window managers.
+#if defined(USE_X11) && !defined(OS_CHROMEOS)
+ // On Linux, panels are only supported on tested window managers.
ui::WindowManagerName wm_type = ui::GuessWindowManager();
if (wm_type != ui::WM_COMPIZ &&
wm_type != ui::WM_ICE_WM &&
@@ -123,18 +124,13 @@ bool PanelManager::ShouldUsePanels(const std::string& extension_id) {
}
#endif // USE_X11 && !OS_CHROMEOS
- version_info::Channel channel = chrome::GetChannel();
- if (channel == version_info::Channel::STABLE ||
- channel == version_info::Channel::BETA) {
- return base::CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kEnablePanels) ||
- extension_id == std::string("nckgahadagoaajjgafhacjanaoiihapd") ||
- extension_id == std::string("ljclpkphhpbpinifbeabbhlfddcpfdde") ||
- extension_id == std::string("ppleadejekpmccmnpjdimmlfljlkdfej") ||
- extension_id == std::string("eggnbpckecmjlblplehfpjjdhhidfdoj");
+ // Without --enable-panels, only support Hangouts.
+ for (const char* id : extension_misc::kHangoutsExtensionIds) {
+ if (extension_id == id)
+ return true;
tapted 2015/09/07 05:30:27 To keep things simple, this would now return true
}
- return true;
+ return false;
}
// static

Powered by Google App Engine
This is Rietveld 408576698