| Index: chrome/common/extensions/extension.cc
|
| ===================================================================
|
| --- chrome/common/extensions/extension.cc (revision 80624)
|
| +++ chrome/common/extensions/extension.cc (working copy)
|
| @@ -1929,16 +1929,17 @@
|
| // TODO(asargent) - We want a more general purpose mechanism for this,
|
| // and better error messages. (http://crbug.com/54013)
|
| if ((permission_str == kWebstorePrivatePermission ||
|
| + permission_str == kChromeosInfoPrivatePermissions ||
|
| permission_str == kFileBrowserPrivatePermission) &&
|
| - location_ != Extension::COMPONENT) {
|
| + (location_ != Extension::COMPONENT
|
| +#ifndef NDEBUG
|
| + && !CommandLine::ForCurrentProcess()->HasSwitch(
|
| + switches::kExposePrivateExtensionApi)
|
| +#endif
|
| + )) {
|
| continue;
|
| }
|
|
|
| - if (permission_str == kChromeosInfoPrivatePermissions &&
|
| - location_ != Extension::COMPONENT) {
|
| - continue;
|
| - }
|
| -
|
| // Remap the old unlimited storage permission name.
|
| if (permission_str == kOldUnlimitedStoragePermission)
|
| permission_str = kUnlimitedStoragePermission;
|
| @@ -2519,7 +2520,12 @@
|
| }
|
|
|
| bool Extension::CanExecuteScriptEverywhere() const {
|
| - if (location() == Extension::COMPONENT)
|
| + if (location() == Extension::COMPONENT
|
| +#ifndef NDEBUG
|
| + || CommandLine::ForCurrentProcess()->HasSwitch(
|
| + switches::kExposePrivateExtensionApi)
|
| +#endif
|
| + )
|
| return true;
|
|
|
| ScriptingWhitelist* whitelist =
|
|
|