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

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: blarh Created 8 years, 3 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 a65b7a1a4cf10d099cf2eff614fed966d71c80dd..8c654faa2a19ec4d61426256d4d4e33b211cdcc0 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,10 @@ 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 = ExtensionErrorUtils::FormatErrorMessageUTF16(
+ errors::kInvalidManifestVersionOld,
+ base::IntToString(kModernManifestVersion));
+ return false;
}
return true;
« no previous file with comments | « chrome/browser/extensions/unpacked_installer.cc ('k') | chrome/common/extensions/extension_manifest_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698