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

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

Issue 10536084: Add a warning when developing an extension that uses old manifest version. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: blonk Created 8 years, 6 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_file_util.cc
diff --git a/chrome/common/extensions/extension_file_util.cc b/chrome/common/extensions/extension_file_util.cc
index 3a024df27e7e22dfa6c813e20e12850d617c1761..0ca65880bacb7143eea399c4d851b2c01f47e358 100644
--- a/chrome/common/extensions/extension_file_util.cc
+++ b/chrome/common/extensions/extension_file_util.cc
@@ -152,7 +152,7 @@ scoped_refptr<Extension> LoadExtension(const FilePath& extension_path,
if (!extension.get())
return NULL;
- std::vector<std::string> warnings;
+ Extension::InstallWarningVector warnings;
if (!ValidateExtension(extension.get(), error, &warnings))
return NULL;
extension->AddInstallWarnings(warnings);
@@ -230,7 +230,7 @@ std::vector<FilePath> FindPrivateKeyFiles(const FilePath& extension_dir) {
bool ValidateExtension(const Extension* extension,
std::string* error,
- std::vector<std::string>* warnings) {
+ Extension::InstallWarningVector* warnings) {
// Validate icons exist.
for (ExtensionIconSet::IconMap::const_iterator iter =
extension->icons().map().begin();
@@ -418,9 +418,11 @@ bool ValidateExtension(const Extension* extension,
}
} else {
for (size_t i = 0; i < private_keys.size(); ++i) {
- warnings->push_back(l10n_util::GetStringFUTF8(
- IDS_EXTENSION_CONTAINS_PRIVATE_KEY,
- private_keys[i].LossyDisplayName()));
+ warnings->push_back(Extension::InstallWarning(
+ Extension::InstallWarning::FORMAT_TEXT,
+ l10n_util::GetStringFUTF8(
+ IDS_EXTENSION_CONTAINS_PRIVATE_KEY,
+ private_keys[i].LossyDisplayName())));
}
// Only warn; don't block loading the extension.
}
« no previous file with comments | « chrome/common/extensions/extension_file_util.h ('k') | chrome/common/extensions/extension_file_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698