diff options
author | mek@chromium.org <mek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-16 02:06:27 +0000 |
---|---|---|
committer | mek@chromium.org <mek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-16 02:06:27 +0000 |
commit | 21db9ef70f4e530848aa6138080e9890d5fd6ae1 (patch) | |
tree | 41628f70e7cb36d4da4f7a618864ed9c322786e2 /extensions/browser/extension_prefs.cc | |
parent | 795989f209fce2d73dd8dfda49bb13ba0c68f8d7 (diff) | |
download | chromium_src-21db9ef70f4e530848aa6138080e9890d5fd6ae1.zip chromium_src-21db9ef70f4e530848aa6138080e9890d5fd6ae1.tar.gz chromium_src-21db9ef70f4e530848aa6138080e9890d5fd6ae1.tar.bz2 |
Support remote installation of extensions and apps.
To enable this support, the following things are changed:
* ExtensionSyncData, and the ExtensionSpecifics protobuf have a new
remote_install field, to mark a remotely installed extension.
* A new DISABLE_REMOTE_INSTALL reason is added to track this state
locally.
* CrxInstaller::allow_silent_install is changed from a bool to a
three-state enum, where the options are:
- install after showing a permission prompt,
- install and grant all permissions without a prompt and
- install without a prompt and don't grant any permissions
* AddExtensionDisabledError is modified to keep track of the disable
reasons, and change the text that is displayed accordingly.
* ExtensionInstallPrompt has a new prompt type with different text
for remotely installed extensions.
BUG=365737
Review URL: https://codereview.chromium.org/264763002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@270900 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'extensions/browser/extension_prefs.cc')
-rw-r--r-- | extensions/browser/extension_prefs.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/extensions/browser/extension_prefs.cc b/extensions/browser/extension_prefs.cc index 81f642f..a3604e9 100644 --- a/extensions/browser/extension_prefs.cc +++ b/extensions/browser/extension_prefs.cc @@ -795,6 +795,12 @@ int ExtensionPrefs::GetDisableReasons(const std::string& extension_id) const { return Extension::DISABLE_NONE; } +bool ExtensionPrefs::HasDisableReason( + const std::string& extension_id, + Extension::DisableReason disable_reason) const { + return (GetDisableReasons(extension_id) & disable_reason) != 0; +} + void ExtensionPrefs::AddDisableReason(const std::string& extension_id, Extension::DisableReason disable_reason) { ModifyDisableReason(extension_id, disable_reason, DISABLE_REASON_ADD); |