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

Unified Diff: chrome/common/extensions/background_info.h

Issue 16398010: Move some extension manifest consistency checks to BackgroundManifestHandler. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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/background_info.h
diff --git a/chrome/common/extensions/background_info.h b/chrome/common/extensions/background_info.h
index 881b94717599f7dae4bab0d753b50b73cffdebf1..5807a3007f690dd4c8f6a7f8a87b541c5b2c0785 100644
--- a/chrome/common/extensions/background_info.h
+++ b/chrome/common/extensions/background_info.h
@@ -32,6 +32,14 @@ class BackgroundInfo : public Extension::ManifestData {
return background_url_.is_valid() || !background_scripts_.empty();
}
+ bool has_persistent_background_page() const {
+ return has_background_page() && is_persistent_;
+ }
+
+ bool has_lazy_background_page() const {
+ return has_background_page() && !is_persistent_;
+ }
+
bool Parse(const Extension* extension, string16* error);
private:
@@ -75,6 +83,7 @@ class BackgroundManifestHandler : public ManifestHandler {
virtual bool Validate(const Extension* extension,
std::string* error,
std::vector<InstallWarning>* warnings) const OVERRIDE;
+ virtual bool AlwaysParseForType(Manifest::Type type) const OVERRIDE;
private:
virtual const std::vector<std::string> Keys() const OVERRIDE;

Powered by Google App Engine
This is Rietveld 408576698