diff options
-rw-r--r-- | chrome/browser/chrome_content_browser_client.cc | 1 | ||||
-rw-r--r-- | chrome/common/chrome_switches.cc | 5 | ||||
-rw-r--r-- | chrome/common/chrome_switches.h | 1 | ||||
-rw-r--r-- | chrome/common/extensions/extension.cc | 4 |
4 files changed, 10 insertions, 1 deletions
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc index 9e3e74f..d5e11ea 100644 --- a/chrome/browser/chrome_content_browser_client.cc +++ b/chrome/browser/chrome_content_browser_client.cc @@ -564,6 +564,7 @@ void ChromeContentBrowserClient::AppendExtraCommandLineSwitches( static const char* const kSwitchNames[] = { switches::kAllowHTTPBackgroundPage, + switches::kAllowLegacyExtensionManifests, switches::kAllowScriptingGallery, switches::kAppsCheckoutURL, switches::kAppsGalleryURL, diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc index 487abcf..7cf7930 100644 --- a/chrome/common/chrome_switches.cc +++ b/chrome/common/chrome_switches.cc @@ -29,6 +29,11 @@ const char kAllowFileAccess[] = "allow-file-access"; // Allows non-https URL for background_page for hosted apps. const char kAllowHTTPBackgroundPage[] = "allow-http-background-page"; +// Allows the browser to load extensions that lack a modern manifest when that +// would otherwise be forbidden. +const char kAllowLegacyExtensionManifests[] + = "allow-legacy-extension-manifests"; + // Don't block outdated plugins. const char kAllowOutdatedPlugins[] = "allow-outdated-plugins"; diff --git a/chrome/common/chrome_switches.h b/chrome/common/chrome_switches.h index 5afd6ff..1d5abcf 100644 --- a/chrome/common/chrome_switches.h +++ b/chrome/common/chrome_switches.h @@ -26,6 +26,7 @@ namespace switches { extern const char kAllowCrossOriginAuthPrompt[]; extern const char kAllowFileAccess[]; extern const char kAllowHTTPBackgroundPage[]; +extern const char kAllowLegacyExtensionManifests[]; extern const char kAllowOutdatedPlugins[]; extern const char kAllowRunningInsecureContent[]; extern const char kAllowScriptingGallery[]; diff --git a/chrome/common/extensions/extension.cc b/chrome/common/extensions/extension.cc index 0144e71..1e84be7 100644 --- a/chrome/common/extensions/extension.cc +++ b/chrome/common/extensions/extension.cc @@ -1413,7 +1413,9 @@ bool Extension::InitFromValue(extensions::Manifest* manifest, int flags, } if (flags & REQUIRE_MODERN_MANIFEST_VERSION && - manifest_version() < kModernManifestVersion) { + manifest_version() < kModernManifestVersion && + !CommandLine::ForCurrentProcess()->HasSwitch( + switches::kAllowLegacyExtensionManifests)) { *error = errors::kInvalidManifestVersion; return false; } |