summaryrefslogtreecommitdiffstats
path: root/extensions/common/extension.h
diff options
context:
space:
mode:
authortreib@chromium.org <treib@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-16 21:41:59 +0000
committertreib@chromium.org <treib@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-16 21:41:59 +0000
commit6338fa3cd09f1c78be2e70690c3b2a2b7756227f (patch)
treeb1296060481d8c580d94279145d659d2be283b19 /extensions/common/extension.h
parentce9926cbd608f0e1a0d2af6f3b294925095f0793 (diff)
downloadchromium_src-6338fa3cd09f1c78be2e70690c3b2a2b7756227f.zip
chromium_src-6338fa3cd09f1c78be2e70690c3b2a2b7756227f.tar.gz
chromium_src-6338fa3cd09f1c78be2e70690c3b2a2b7756227f.tar.bz2
Apps&Extensions for supervised users: Add Extension::WAS_INSTALLED_BY_CUSTODIAN flag and proto entry.
Currently, supervised users can not use Apps/Extensions at all. In the future, their custodian will be able to remotely install Apps/Extensions for them. This CL introduces a new extension flag and corresponding proto entry that marks these extensions, so we can allow only those in the client. Relevant design doc section: https://docs.google.com/a/google.com/document/d/1rqahhrErR_HiZ04v-Skb_kvXeyOfnTvBPFvKwAxuf10/edit#heading=h.ptivtbjwlda5 BUG=390520 Review URL: https://codereview.chromium.org/353493002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@283522 0039d316-1c4b-4281-b951-d872f2087c98
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 933c47c..c24cb21 100644
--- a/extensions/common/extension.h
+++ b/extensions/common/extension.h
@@ -170,6 +170,10 @@ class Extension : public base::RefCountedThreadSafe<Extension> {
// also installed by Default (i.e. WAS_INSTALLED_BY_DEFAULT is also true).
WAS_INSTALLED_BY_OEM = 1 << 10,
+ // |WAS_INSTALLED_BY_CUSTODIAN| means this extension was installed by the
+ // custodian of a supervised user.
+ WAS_INSTALLED_BY_CUSTODIAN = 1 << 11,
+
// When adding new flags, make sure to update kInitFromValueFlagBits.
};
@@ -334,6 +338,9 @@ class Extension : public base::RefCountedThreadSafe<Extension> {
bool was_installed_by_oem() const {
return (creation_flags_ & WAS_INSTALLED_BY_OEM) != 0;
}
+ bool was_installed_by_custodian() const {
+ return (creation_flags_ & WAS_INSTALLED_BY_CUSTODIAN) != 0;
+ }
// App-related.
bool is_app() const;