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

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

Issue 9150008: Introduce background.scripts feature for extension manifests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 11 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 ca31d830aca36d70e599b96aa566790a7e0c93c6..47996c1f3c264ecadc217c9e85511f75cf911284 100644
--- a/chrome/common/extensions/extension_file_util.cc
+++ b/chrome/common/extensions/extension_file_util.cc
@@ -292,9 +292,11 @@ bool ValidateExtension(const Extension* extension, std::string* error) {
// Validate background page location, except for hosted apps, which should use
// an external URL. Background page for hosted apps are verified when the
// extension is created (in Extension::InitFromValue)
- if (!extension->background_url().is_empty() && !extension->is_hosted_app()) {
+ if (extension->has_background_page() &&
+ !extension->is_hosted_app() &&
+ extension->background_scripts().empty()) {
FilePath page_path = ExtensionURLToRelativeFilePath(
- extension->background_url());
+ extension->GetBackgroundURL());
const FilePath path = extension->GetResource(page_path).GetFilePath();
if (path.empty() || !file_util::PathExists(path)) {
*error =

Powered by Google App Engine
This is Rietveld 408576698