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

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: Adding comment to ScopedAllowIO.wq 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
« no previous file with comments | « chrome/common/chrome_switches.cc ('k') | chrome/common/extensions/extension_file_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/extension.cc
diff --git a/chrome/common/extensions/extension.cc b/chrome/common/extensions/extension.cc
index 1690e4431cc9c4d5770e6f98e4381bf3143afaf4..a7012027fd8f7faf58dd845470e4806247d75af5 100644
--- a/chrome/common/extensions/extension.cc
+++ b/chrome/common/extensions/extension.cc
@@ -1999,7 +1999,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
) ||
@@ -2828,17 +2828,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 {
@@ -2860,12 +2850,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 =
« no previous file with comments | « chrome/common/chrome_switches.cc ('k') | chrome/common/extensions/extension_file_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698