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

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

Issue 8659002: Adding the --load-component-extension flag. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added a unit test. Created 9 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
Index: chrome/common/extensions/extension.cc
diff --git a/chrome/common/extensions/extension.cc b/chrome/common/extensions/extension.cc
index 1e84be7560bbf5313dc5b32322f2292a53eacef4..86f7be8fef14b7e207e239217475fc508a4e1ec4 100644
--- a/chrome/common/extensions/extension.cc
+++ b/chrome/common/extensions/extension.cc
@@ -2000,7 +2000,7 @@ bool Extension::InitFromValue(extensions::Manifest* manifest, int flags,
page != chrome::kChromeUIHistoryHost
#if defined(FILE_MANAGER_EXTENSION)
&&
- !(location() == COMPONENT &&
+ !(location() == COMPONENT &&
page == chrome::kChromeUIFileManagerHost)
#endif
) ||
@@ -2829,17 +2829,7 @@ bool Extension::CanSpecifyComponentOnlyPermission() const {
// Only COMPONENT extensions can use private APIs.
// TODO(asargent) - We want a more general purpose mechanism for this,
// and better error messages. (http://crbug.com/54013)
- if (location_ == Extension::COMPONENT)
- return true;
-
-#ifndef NDEBUG
- if (CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kExposePrivateExtensionApi)) {
- return true;
- }
-#endif
-
- return false;
+ return location_ == Extension::COMPONENT;
}
bool Extension::CanSpecifyExperimentalPermission() const {
@@ -2861,12 +2851,7 @@ bool Extension::CanSpecifyExperimentalPermission() const {
}
bool Extension::CanExecuteScriptEverywhere() const {
- if (location() == Extension::COMPONENT
-#ifndef NDEBUG
- || CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kExposePrivateExtensionApi)
-#endif
- )
+ if (location() == Extension::COMPONENT)
return true;
ScriptingWhitelist* whitelist =

Powered by Google App Engine
This is Rietveld 408576698