summaryrefslogtreecommitdiffstats
path: root/extensions/shell/common
diff options
context:
space:
mode:
authorrockot <rockot@chromium.org>2014-11-13 14:06:51 -0800
committerCommit bot <commit-bot@chromium.org>2014-11-13 22:07:27 +0000
commitec1e64be203b2390029990eeca3596e0c10aed27 (patch)
tree8a17d41a08bb05056d71d856c9e7c703824c929b /extensions/shell/common
parentbf25028c580a6460ae1d8f6e1b6f05c59edad57f (diff)
downloadchromium_src-ec1e64be203b2390029990eeca3596e0c10aed27.zip
chromium_src-ec1e64be203b2390029990eeca3596e0c10aed27.tar.gz
chromium_src-ec1e64be203b2390029990eeca3596e0c10aed27.tar.bz2
Move browser image path logic into ExtensionsClient
Currently, extension_file_util::GetBrowserImagePaths exists and provides universal logic for identifying sensitive image paths within an extension: i.e. paths to images which may need to be transcoded before being handed to the browser to display in its privileged UI. This list of images depends entirely on the extensions embedder, so it makes sense to define it within ExtensionsClient. That's what this CL does. It establishes such an interface in ExtensionsClient, and moves the very Chrome-specific logic out of extension_file_util::GetBrowserImagePaths and into ChromeExtensionsClient. BUG=398671 R=scheib@chromium.org TBR=shuchen@chromium.org,yoz@chromium.org for mechanical updates Review URL: https://codereview.chromium.org/719403002 Cr-Commit-Position: refs/heads/master@{#304096}
Diffstat (limited to 'extensions/shell/common')
-rw-r--r--extensions/shell/common/shell_extensions_client.cc5
-rw-r--r--extensions/shell/common/shell_extensions_client.h2
2 files changed, 7 insertions, 0 deletions
diff --git a/extensions/shell/common/shell_extensions_client.cc b/extensions/shell/common/shell_extensions_client.cc
index 9df2b12..a598ded 100644
--- a/extensions/shell/common/shell_extensions_client.cc
+++ b/extensions/shell/common/shell_extensions_client.cc
@@ -209,4 +209,9 @@ bool ShellExtensionsClient::IsBlacklistUpdateURL(const GURL& url) const {
return true;
}
+std::set<base::FilePath> ShellExtensionsClient::GetBrowserImagePaths(
+ const Extension* extension) {
+ return std::set<base::FilePath>();
+}
+
} // namespace extensions
diff --git a/extensions/shell/common/shell_extensions_client.h b/extensions/shell/common/shell_extensions_client.h
index 1b6dece..cbb72e1 100644
--- a/extensions/shell/common/shell_extensions_client.h
+++ b/extensions/shell/common/shell_extensions_client.h
@@ -44,6 +44,8 @@ class ShellExtensionsClient : public ExtensionsClient {
std::string GetWebstoreBaseURL() const override;
std::string GetWebstoreUpdateURL() const override;
bool IsBlacklistUpdateURL(const GURL& url) const override;
+ std::set<base::FilePath> GetBrowserImagePaths(
+ const Extension* extension) override;
private:
const ExtensionsAPIPermissions extensions_api_permissions_;