summaryrefslogtreecommitdiffstats
path: root/extensions/common/extension.h
diff options
context:
space:
mode:
authorbinjin <binjin@chromium.org>2014-11-18 04:10:24 -0800
committerCommit bot <commit-bot@chromium.org>2014-11-18 12:10:54 +0000
commit47947f841e18fa93ff2ec76ab731a57965dc98ec (patch)
tree85ae503334f2a9187872a83bbf9dcbecefe7b157 /extensions/common/extension.h
parentb8dde40da782604227baee3cd28c774920a13470 (diff)
downloadchromium_src-47947f841e18fa93ff2ec76ab731a57965dc98ec.zip
chromium_src-47947f841e18fa93ff2ec76ab731a57965dc98ec.tar.gz
chromium_src-47947f841e18fa93ff2ec76ab731a57965dc98ec.tar.bz2
Add more management policy checking after extension installed
This CL adds checking for MustRemainDisabled() from management policy after an extension is installed or updated, so that extensions supposed to be disabled will be disabled initially with proper disabled reason set. This CL also assumes that all disabled extension comes with proper disabled reason, so there are additional changes to ensure this. 1) Another extension disabled reason DISABLE_EXTERNAL_EXTENSION is added for external extensions. These extensions will be disabled initially on windows for user prompting. 2) Two tests from extension_disabled_ui_browsertest.cc is removed since these two tests are meant for legacy disables with not disabled reason set in user pref, which should be rarely seen now. And these rare cases are handled by presuming it's disabled by user action as well. BUG=None Review URL: https://codereview.chromium.org/714133002 Cr-Commit-Position: refs/heads/master@{#304587}
Diffstat (limited to 'extensions/common/extension.h')
-rw-r--r--extensions/common/extension.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/extensions/common/extension.h b/extensions/common/extension.h
index 4c76478..391c7e5 100644
--- a/extensions/common/extension.h
+++ b/extensions/common/extension.h
@@ -102,7 +102,9 @@ class Extension : public base::RefCountedThreadSafe<Extension> {
DISABLE_REMOTE_INSTALL = 1 << 11,
DISABLE_INACTIVE_EPHEMERAL_APP = 1 << 12, // Cached ephemeral apps are
// disabled to prevent activity.
- DISABLE_REASON_LAST = 1 << 13, // This should always be the last value
+ DISABLE_EXTERNAL_EXTENSION = 1 << 13, // External extensions might be
+ // disabled for user prompting.
+ DISABLE_REASON_LAST = 1 << 14, // This should always be the last value
};
// A base class for parsed manifest data that APIs want to store on