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

Unified Diff: chrome/common/extensions/extension.cc

Issue 271117: Limit extensions to 1 UI surface (either Page/Browser action, but not both).... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 2 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
« no previous file with comments | « no previous file | chrome/common/extensions/extension_constants.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/extension.cc
===================================================================
--- chrome/common/extensions/extension.cc (revision 29153)
+++ chrome/common/extensions/extension.cc (working copy)
@@ -958,6 +958,12 @@
// Initialize browser action (optional).
if (source.HasKey(keys::kBrowserAction)) {
+ // Restrict extensions to one UI surface.
+ if (source.HasKey(keys::kPageAction) || source.HasKey(keys::kPageActions)) {
+ *error = errors::kOneUISurfaceOnly;
+ return false;
+ }
+
DictionaryValue* browser_action_value;
if (!source.GetDictionary(keys::kBrowserAction, &browser_action_value)) {
*error = errors::kInvalidBrowserAction;
« no previous file with comments | « no previous file | chrome/common/extensions/extension_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698