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

Unified Diff: chrome/common/extensions/extension_unpacker.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
« no previous file with comments | « chrome/common/extensions/extension_unittest.cc ('k') | chrome/common/extensions/manifest.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/extension_unpacker.cc
diff --git a/chrome/common/extensions/extension_unpacker.cc b/chrome/common/extensions/extension_unpacker.cc
index 7915de16cadcf1b2924e42fa6fedfe9b1fd057c4..965ea0e08d369c392e35ce93d86006ee69c46519 100644
--- a/chrome/common/extensions/extension_unpacker.cc
+++ b/chrome/common/extensions/extension_unpacker.cc
@@ -30,6 +30,8 @@ namespace errors = extension_manifest_errors;
namespace keys = extension_manifest_keys;
namespace filenames = extension_filenames;
+using extensions::Extension;
+
namespace {
// Errors
@@ -86,7 +88,7 @@ bool PathContainsParentDirectory(const FilePath& path) {
ExtensionUnpacker::ExtensionUnpacker(const FilePath& extension_path,
const std::string& extension_id,
- extensions::Extension::Location location,
+ Extension::Location location,
int creation_flags)
: extension_path_(extension_path),
extension_id_(extension_id),
@@ -99,7 +101,7 @@ ExtensionUnpacker::~ExtensionUnpacker() {
DictionaryValue* ExtensionUnpacker::ReadManifest() {
FilePath manifest_path =
- temp_install_dir_.Append(extensions::Extension::kManifestFilename);
+ temp_install_dir_.Append(Extension::kManifestFilename);
if (!file_util::PathExists(manifest_path)) {
SetError(errors::kInvalidManifest);
return NULL;
@@ -124,7 +126,7 @@ DictionaryValue* ExtensionUnpacker::ReadManifest() {
bool ExtensionUnpacker::ReadAllMessageCatalogs(
const std::string& default_locale) {
FilePath locales_path =
- temp_install_dir_.Append(extensions::Extension::kLocaleFolder);
+ temp_install_dir_.Append(Extension::kLocaleFolder);
// Not all folders under _locales have to be valid locales.
file_util::FileEnumerator locales(locales_path,
@@ -140,7 +142,7 @@ bool ExtensionUnpacker::ReadAllMessageCatalogs(
continue;
FilePath messages_path =
- locale_path.Append(extensions::Extension::kMessagesFilename);
+ locale_path.Append(Extension::kMessagesFilename);
if (!ReadMessageCatalog(messages_path))
return false;
@@ -178,7 +180,7 @@ bool ExtensionUnpacker::Run() {
return false; // Error was already reported.
std::string error;
- scoped_refptr<extensions::Extension> extension(extensions::Extension::Create(
+ scoped_refptr<Extension> extension(Extension::Create(
temp_install_dir_,
location_,
*parsed_manifest_,
@@ -190,7 +192,7 @@ bool ExtensionUnpacker::Run() {
return false;
}
- std::vector<std::string> warnings;
+ Extension::InstallWarningVector warnings;
if (!extension_file_util::ValidateExtension(extension.get(),
&error, &warnings)) {
SetError(error);
« no previous file with comments | « chrome/common/extensions/extension_unittest.cc ('k') | chrome/common/extensions/manifest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698