Index: chrome/browser/extensions/extension_sync_service.cc |
diff --git a/chrome/browser/extensions/extension_sync_service.cc b/chrome/browser/extensions/extension_sync_service.cc |
index 7dbe61398620e9c4f501402ea160bd4ed24f164f..301f5ba09ae6eccdd7486771c270fe4dd2e41587 100644 |
--- a/chrome/browser/extensions/extension_sync_service.cc |
+++ b/chrome/browser/extensions/extension_sync_service.cc |
@@ -254,7 +254,9 @@ extensions::ExtensionSyncData ExtensionSyncService::GetExtensionSyncData( |
return extensions::ExtensionSyncData( |
extension, |
extension_service_->IsExtensionEnabled(extension.id()), |
- extensions::util::IsIncognitoEnabled(extension.id(), profile_)); |
+ extensions::util::IsIncognitoEnabled(extension.id(), profile_), |
+ extension_prefs_->GetDisableReasons(extension.id()) & |
+ Extension::DISABLE_REMOTE_INSTALL); |
} |
extensions::AppSyncData ExtensionSyncService::GetAppSyncData( |
@@ -263,6 +265,8 @@ extensions::AppSyncData ExtensionSyncService::GetAppSyncData( |
extension, |
extension_service_->IsExtensionEnabled(extension.id()), |
extensions::util::IsIncognitoEnabled(extension.id(), profile_), |
+ extension_prefs_->GetDisableReasons(extension.id()) & |
+ Extension::DISABLE_REMOTE_INSTALL, |
extension_prefs_->app_sorting()->GetAppLaunchOrdinal(extension.id()), |
extension_prefs_->app_sorting()->GetPageOrdinal(extension.id()), |
extensions::GetLaunchTypePrefValue(extension_prefs_, extension.id())); |
@@ -467,9 +471,12 @@ bool ExtensionSyncService::ProcessExtensionSyncDataHelper( |
// is called for it. |
if (extension_sync_data.enabled()) |
extension_service_->EnableExtension(id); |
- else if (!IsPendingEnable(id)) |
- extension_service_->DisableExtension( |
- id, Extension::DISABLE_UNKNOWN_FROM_SYNC); |
+ else if (!IsPendingEnable(id)) { |
+ Extension::DisableReason reason = Extension::DISABLE_UNKNOWN_FROM_SYNC; |
+ if (extension_sync_data.remote_install()) |
Yoyo Zhou
2014/05/01 22:53:44
I would prefer that this be written more clearly t
Marijn Kruisselbrink
2014/05/05 20:45:36
Okay, I changed this around a bit.
|
+ reason = Extension::DISABLE_REMOTE_INSTALL; |
+ extension_service_->DisableExtension(id, reason); |
+ } |
// We need to cache some version information here because setting the |
// incognito flag invalidates the |extension| pointer (it reloads the |
@@ -501,7 +508,8 @@ bool ExtensionSyncService::ProcessExtensionSyncDataHelper( |
id, |
extension_sync_data.update_url(), |
filter, |
- kInstallSilently)) { |
+ kInstallSilently, |
+ extension_sync_data.remote_install())) { |
LOG(WARNING) << "Could not add pending extension for " << id; |
// This means that the extension is already pending installation, with a |
// non-INTERNAL location. Add to pending_sync_data, even though it will |