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

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

Issue 11726002: Move the parsing of 'update_url' & 'options_page' URLs out of Extension. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@url_parse
Patch Set: fixed HomepageURLManifestTest.GetHomepageURL Created 7 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/manifest_url_handler.h
diff --git a/chrome/common/extensions/manifest_url_handler.h b/chrome/common/extensions/manifest_url_handler.h
index befb5108d03718fd7db2f4b3c31e0e74010c96fe..36726a01fed74220ff8915e0b4617447e0cb0957 100644
--- a/chrome/common/extensions/manifest_url_handler.h
+++ b/chrome/common/extensions/manifest_url_handler.h
@@ -25,6 +25,12 @@ struct ManifestURL : public Extension::ManifestData {
// this returns the Google Gallery URL. For third-party extensions,
// this returns a blank GURL.
static const GURL GetHomepageURL(const Extension* extension);
+
+ // Returns the Update URL for this extension.
+ static const GURL& GetUpdateURL(const Extension* extension);
+
+ // Returns the Options Page for this extension.
+ static const GURL& GetOptionsPage(const Extension* extension);
};
// A structure to hold the chrome URL overrides that may be specified
@@ -66,6 +72,28 @@ class HomepageURLHandler : public ManifestHandler {
string16* error) OVERRIDE;
};
+// Parses the "update_url" manifest key.
+class UpdateURLHandler : public ManifestHandler {
+ public:
+ UpdateURLHandler();
+ virtual ~UpdateURLHandler();
+
+ virtual bool Parse(const base::Value* value,
+ Extension* extension,
+ string16* error) OVERRIDE;
+};
+
+// Parses the "options_page" manifest key.
+class OptionsPageHandler : public ManifestHandler {
+ public:
+ OptionsPageHandler();
+ virtual ~OptionsPageHandler();
+
+ virtual bool Parse(const base::Value* value,
+ Extension* extension,
+ string16* error) OVERRIDE;
+};
+
// Parses the "chrome_url_overrides" manifest key.
class URLOverridesHandler : public ManifestHandler {
public:

Powered by Google App Engine
This is Rietveld 408576698