diff options
author | rockot <rockot@chromium.org> | 2014-09-18 12:31:52 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-09-18 19:32:14 +0000 |
commit | 9065985da2ce2a4f73150ac5eabab29c5d67505d (patch) | |
tree | a7e5407965a7b5e6905210344c2352ff2ce4adb5 /extensions/shell/common | |
parent | d4a62b87d28f0bda1c9453f02d9ea22fccaf700c (diff) | |
download | chromium_src-9065985da2ce2a4f73150ac5eabab29c5d67505d.zip chromium_src-9065985da2ce2a4f73150ac5eabab29c5d67505d.tar.gz chromium_src-9065985da2ce2a4f73150ac5eabab29c5d67505d.tar.bz2 |
Move Webstore URL concepts to //extensions and out
of Chrome-specific "constants."
These URLs can be overridden by extensions embedders now
and are no longer incorrectly classified as "constants."
BUG=398671
TBR=xiyuan@chromium.org,sky@chromium.org for various files with header updates
Review URL: https://codereview.chromium.org/575113002
Cr-Commit-Position: refs/heads/master@{#295523}
Diffstat (limited to 'extensions/shell/common')
-rw-r--r-- | extensions/shell/common/shell_extensions_client.cc | 15 | ||||
-rw-r--r-- | extensions/shell/common/shell_extensions_client.h | 3 |
2 files changed, 18 insertions, 0 deletions
diff --git a/extensions/shell/common/shell_extensions_client.cc b/extensions/shell/common/shell_extensions_client.cc index be135c7..493acca 100644 --- a/extensions/shell/common/shell_extensions_client.cc +++ b/extensions/shell/common/shell_extensions_client.cc @@ -9,6 +9,7 @@ #include "extensions/common/api/generated_schemas.h" #include "extensions/common/api/sockets/sockets_manifest_handler.h" #include "extensions/common/common_manifest_handlers.h" +#include "extensions/common/extension_urls.h" #include "extensions/common/features/api_feature.h" #include "extensions/common/features/base_feature_provider.h" #include "extensions/common/features/json_feature_provider_source.h" @@ -193,4 +194,18 @@ bool ShellExtensionsClient::ShouldSuppressFatalErrors() const { return true; } +std::string ShellExtensionsClient::GetWebstoreBaseURL() const { + return extension_urls::kChromeWebstoreBaseURL; +} + +std::string ShellExtensionsClient::GetWebstoreUpdateURL() const { + return extension_urls::kChromeWebstoreUpdateURL; +} + +bool ShellExtensionsClient::IsBlacklistUpdateURL(const GURL& url) const { + // TODO(rockot): Maybe we want to do something else here. For now we accept + // any URL as a blacklist URL because we don't really care. + return true; +} + } // namespace extensions diff --git a/extensions/shell/common/shell_extensions_client.h b/extensions/shell/common/shell_extensions_client.h index 10e6f20..43fc4b7 100644 --- a/extensions/shell/common/shell_extensions_client.h +++ b/extensions/shell/common/shell_extensions_client.h @@ -44,6 +44,9 @@ class ShellExtensionsClient : public ExtensionsClient { const std::string& name) const OVERRIDE; virtual void RegisterAPISchemaResources(ExtensionAPI* api) const OVERRIDE; virtual bool ShouldSuppressFatalErrors() const OVERRIDE; + virtual std::string GetWebstoreBaseURL() const OVERRIDE; + virtual std::string GetWebstoreUpdateURL() const OVERRIDE; + virtual bool IsBlacklistUpdateURL(const GURL& url) const OVERRIDE; private: const ExtensionsAPIPermissions extensions_api_permissions_; |