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

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

Issue 10217017: Allow features to refer to subkeys in _manifest_features.json. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix theme test Created 8 years, 8 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/docs/samples.json ('k') | chrome/common/extensions/extension_manifest_constants.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/extension.cc
diff --git a/chrome/common/extensions/extension.cc b/chrome/common/extensions/extension.cc
index adbaa0a3a2f0a18c23cf72884fec9323ec7de0e4..cf3a090ae0fe16e4fc14980e12769528cc792688 100644
--- a/chrome/common/extensions/extension.cc
+++ b/chrome/common/extensions/extension.cc
@@ -475,13 +475,17 @@ scoped_refptr<Extension> Extension::Create(const FilePath& path,
location,
scoped_ptr<DictionaryValue>(value.DeepCopy())));
- if (!InitExtensionID(manifest.get(), path, explicit_id, flags, &error) ||
- !manifest->ValidateManifest(&error)) {
+ if (!InitExtensionID(manifest.get(), path, explicit_id, flags, &error)) {
*utf8_error = UTF16ToUTF8(error);
return NULL;
}
+ std::vector<std::string> install_warnings;
+ manifest->ValidateManifest(&install_warnings);
+
scoped_refptr<Extension> extension = new Extension(path, manifest.Pass());
+ extension->install_warnings_.swap(install_warnings);
+
if (!extension->InitFromValue(flags, &error)) {
*utf8_error = UTF16ToUTF8(error);
return NULL;
@@ -1878,12 +1882,10 @@ bool Extension::LoadBackgroundPersistent(
const ExtensionAPIPermissionSet& api_permissions,
string16* error) {
Value* background_persistent = NULL;
- if (!api_permissions.count(ExtensionAPIPermission::kExperimental) ||
- !manifest_->Get(keys::kBackgroundPersistent, &background_persistent))
+ if (!manifest_->Get(keys::kBackgroundPersistent, &background_persistent))
return true;
- if (!background_persistent->IsType(Value::TYPE_BOOLEAN) ||
- !background_persistent->GetAsBoolean(&background_page_is_persistent_)) {
+ if (!background_persistent->GetAsBoolean(&background_page_is_persistent_)) {
*error = ASCIIToUTF16(errors::kInvalidBackgroundPersistent);
return false;
}
« no previous file with comments | « chrome/common/extensions/docs/samples.json ('k') | chrome/common/extensions/extension_manifest_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698