Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2620)

Unified Diff: extensions/common/extension.h

Issue 353493002: Apps&Extensions for supervised users: Add Extension::WAS_INSTALLED_BY_CUSTODIAN flag and proto entry (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: update test Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: extensions/common/extension.h
diff --git a/extensions/common/extension.h b/extensions/common/extension.h
index cf5e85ca490988918947d3729c492fac7297c1c4..71e58e5ddb5549951b1d420d432e33d2f9311d05 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.
not at google - send to devlin 2014/07/01 17:22:47 this would be better as a flag in ExtensionPrefs
not at google - send to devlin 2014/07/01 17:23:30 like https://code.google.com/p/chromium/codesearch
Marc Treib 2014/07/02 11:58:12 The problem with that approach is that ExtensionPr
not at google - send to devlin 2014/07/02 16:18:56 I see. I agree that writing something to preferenc
Marc Treib 2014/07/07 08:58:17 At the time UserMayLoad is called, the extension m
Bernhard Bauer 2014/07/07 09:11:58 Does it actually ever make sense to call UserMayLo
Marc Treib 2014/07/07 09:20:04 E.g. on a policy change, all existing (installed)
Yoyo Zhou 2014/07/08 01:55:11 This already happens. We re-check on startup in ca
+ 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;

Powered by Google App Engine
This is Rietveld 408576698