Chromium Code Reviews| Index: extensions/common/extension_urls.h |
| diff --git a/extensions/common/extension_urls.h b/extensions/common/extension_urls.h |
| index 2236a81c307071501c55804392006ae05015704a..be138bb6736ca8e24e45edf9fa69cdef75d35c9a 100644 |
| --- a/extensions/common/extension_urls.h |
| +++ b/extensions/common/extension_urls.h |
| @@ -5,8 +5,12 @@ |
| #ifndef EXTENSIONS_COMMON_EXTENSION_URLS_H_ |
| #define EXTENSIONS_COMMON_EXTENSION_URLS_H_ |
| +#include <string> |
| + |
| #include "base/strings/string16.h" |
| +class GURL; |
| + |
| namespace extensions { |
| // The name of the event_bindings module. |
| @@ -23,4 +27,48 @@ bool IsSourceFromAnExtension(const base::string16& source); |
| } // namespace extensions |
| +namespace extension_urls { |
| + |
| +// Returns the URL prefix for the extension/apps gallery. Can be set via the |
| +// --apps-gallery-url switch. The URL returned will not contain a trailing |
| +// slash. Do not use this as a prefix/extent for the store. |
| +std::string GetWebstoreLaunchURL(); |
| + |
| +// Returns the URL to the extensions category on the Web Store. This is |
| +// derived from GetWebstoreLaunchURL(). |
| +std::string GetExtensionGalleryURL(); |
|
asargent_no_longer_on_chrome
2014/09/17 21:41:32
A long time ago we renamed the "extensions gallery
Ken Rockot(use gerrit already)
2014/09/17 22:04:29
Done.
|
| + |
| +// Returns the URL prefix for an item in the extension/app gallery. This URL |
| +// will contain a trailing slash and should be concatenated with an item ID |
| +// to get the item detail URL. |
| +std::string GetWebstoreItemDetailURLPrefix(); |
| + |
| +// Returns the URL used to get webstore data (ratings, manifest, icon URL, |
| +// etc.) about an extension from the webstore as JSON. |
| +GURL GetWebstoreItemJsonDataURL(const std::string& extension_id); |
| + |
| +// Returns the URL used to get webstore search results in JSON format. The URL |
| +// returns a JSON dictionary that has the search results (under "results"). |
| +// Each entry in the array is a dictionary as the data returned for |
| +// GetWebstoreItemJsonDataURL above. |query| is the user typed query string. |
| +// |hl| is the host language code, e.g. en_US. Both arguments will be escaped |
|
asargent_no_longer_on_chrome
2014/09/17 21:41:32
nit: consider renaming hl to host_language_code
Ken Rockot(use gerrit already)
2014/09/17 22:04:29
Done.
|
| +// and added as a query parameter to the returned web store json search URL. |
| +GURL GetWebstoreJsonSearchUrl(const std::string& query, const std::string& hl); |
| + |
| +// Returns the URL of the web store search results page for |query|. |
| +GURL GetWebstoreSearchPageUrl(const std::string& query); |
| + |
| +// Return the update URL used by gallery/webstore extensions/apps. This may |
| +// have been overridden by a command line flag for testing purposes. |
| +GURL GetWebstoreUpdateUrl(); |
| + |
| +// Returns whether the URL is the webstore update URL (just considering host |
| +// and path, not scheme, query, etc.) |
| +bool IsWebstoreUpdateUrl(const GURL& update_url); |
| + |
| +// Returns true if the URL points to an extension blacklist. |
| +bool IsBlacklistUpdateUrl(const GURL& url); |
| + |
| +} // namespace extension_urls |
| + |
| #endif // EXTENSIONS_COMMON_EXTENSION_URLS_H_ |