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

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

Issue 10912041: Disallow packing or loading unpacked manifest v1 extensions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix fix Created 8 years, 4 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
Index: chrome/common/extensions/extension.cc
diff --git a/chrome/common/extensions/extension.cc b/chrome/common/extensions/extension.cc
index 24916813fd73b5dca9f529017f34a0d27c1da2fa..028912815ae283b0faa2dc68922d0eda8fdb0d7d 100644
--- a/chrome/common/extensions/extension.cc
+++ b/chrome/common/extensions/extension.cc
@@ -73,7 +73,7 @@ namespace extensions {
namespace {
-const int kModernManifestVersion = 1;
+const int kModernManifestVersion = 2;
const int kPEMOutputColumns = 65;
const char kOverrideExtentUrlPatternFormat[] = "chrome://%s/*";
@@ -1358,18 +1358,8 @@ bool Extension::LoadManifestVersion(string16* error) {
manifest_version_ < kModernManifestVersion &&
!CommandLine::ForCurrentProcess()->HasSwitch(
switches::kAllowLegacyExtensionManifests)) {
- *error = ASCIIToUTF16(errors::kInvalidManifestVersion);
- return false;
- }
-
- if (location() == LOAD && manifest_version_ == 1) {
- install_warnings_.push_back(Extension::InstallWarning(
- Extension::InstallWarning::FORMAT_HTML,
- l10n_util::GetStringFUTF8(
- IDS_EXTENSION_MANIFEST_VERSION_OLD,
- ASCIIToUTF16("<a href='http://code.google.com/chrome/extensions/"
- "manifestVersion.html' target='_blank'>"),
- ASCIIToUTF16("</a>"))));
+ *error = ASCIIToUTF16(errors::kInvalidManifestVersionOld);
Mihai Parparita -not on Chrome 2012/08/31 20:50:16 You could make kModernManifestVersion into a forma
Aaron Boodman 2012/08/31 21:03:17 Done.
+ return false;
}
return true;

Powered by Google App Engine
This is Rietveld 408576698