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
diff --git a/chrome/browser/extensions/extension_sync_data.cc b/chrome/browser/extensions/extension_sync_data.cc
index 0ebe72e..aaf1244 100644
--- a/chrome/browser/extensions/extension_sync_data.cc
+++ b/chrome/browser/extensions/extension_sync_data.cc
@@ -31,8 +31,8 @@
}
ExtensionSyncData::ExtensionSyncData(const syncer::SyncChange& sync_change)
- : uninstalled_(
- sync_change.change_type() == syncer::SyncChange::ACTION_DELETE),
+ : uninstalled_(sync_change.change_type() ==
+ syncer::SyncChange::ACTION_DELETE),
enabled_(false),
incognito_enabled_(false),
remote_install_(false) {
@@ -41,12 +41,13 @@
ExtensionSyncData::ExtensionSyncData(const Extension& extension,
bool enabled,
- bool incognito_enabled)
- : id_(extension.id()),
+ bool incognito_enabled,
+ bool remote_install)
+ : id_(extension.id()),
uninstalled_(false),
enabled_(enabled),
incognito_enabled_(incognito_enabled),
- remote_install_(false),
+ remote_install_(remote_install),
version_(extension.from_bookmark() ? base::Version("0")
: *extension.version()),
update_url_(ManifestURL::GetUpdateURL(&extension)),