summaryrefslogtreecommitdiffstats
path: root/extensions/common/extension.h
diff options
context:
space:
mode:
authorrockot <rockot@chromium.org>2014-09-02 16:14:15 -0700
committerCommit bot <commit-bot@chromium.org>2014-09-02 23:17:04 +0000
commit43ae1fb32df63bfd42c13914feb6a71f111fccb3 (patch)
tree745ae3ec372d3d572668e27d9883b016409a4b31 /extensions/common/extension.h
parentb0b8648dc4298ee5cd46259bae0da66d04a631f9 (diff)
downloadchromium_src-43ae1fb32df63bfd42c13914feb6a71f111fccb3.zip
chromium_src-43ae1fb32df63bfd42c13914feb6a71f111fccb3.tar.gz
chromium_src-43ae1fb32df63bfd42c13914feb6a71f111fccb3.tar.bz2
Enable forced extension updates on NaCl arch mismatch
This makes extensions aware of the platforms for which they have platform-specific resources installed, if any. This also hooks up the extension update code with some additional logic to place an extension in forced-update mode if it has platform-specific resources which don't match the current NaCl architecture. BUG=409948 TEST=install an extension which uses NaCl (QuickOffice for example). Rename the _platform-specific/<your-nacl-arch> directory some something else and force an update (e.g. via chrome://extensions button). Observe that a new CRX is downloaded and installed. Review URL: https://codereview.chromium.org/516293007 Cr-Commit-Position: refs/heads/master@{#293018}
Diffstat (limited to 'extensions/common/extension.h')
-rw-r--r--extensions/common/extension.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/extensions/common/extension.h b/extensions/common/extension.h
index 668f52f..9312c62 100644
--- a/extensions/common/extension.h
+++ b/extensions/common/extension.h
@@ -351,6 +351,9 @@ class Extension : public base::RefCountedThreadSafe<Extension> {
void AddWebExtentPattern(const URLPattern& pattern);
const URLPatternSet& web_extent() const { return extent_; }
+ bool HasPlatformSpecificResources() const;
+ bool HasResourcesForPlatform(const std::string& arch) const;
+
private:
friend class base::RefCountedThreadSafe<Extension>;
@@ -480,6 +483,10 @@ class Extension : public base::RefCountedThreadSafe<Extension> {
// The flags that were passed to InitFromValue.
int creation_flags_;
+ // The set of archs for which platform-specific resources are present in
+ // this extension installation.
+ std::set<std::string> platform_specific_resource_archs_;
+
DISALLOW_COPY_AND_ASSIGN(Extension);
};