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

Unified Diff: chrome/browser/extensions/extension_service.cc

Issue 1236363002: ExtensionSyncService cleanup: process uninstalls in one step (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review Created 5 years, 5 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
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_sync_service.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_service.cc
diff --git a/chrome/browser/extensions/extension_service.cc b/chrome/browser/extensions/extension_service.cc
index 516985a9db9fcd39f3b2a2a020633fbda82eb674..4a1919f96453a0140328f7aaa1b20c8cef7b40b0 100644
--- a/chrome/browser/extensions/extension_service.cc
+++ b/chrome/browser/extensions/extension_service.cc
@@ -743,15 +743,6 @@ bool ExtensionService::UninstallExtension(
return false;
}
- syncer::SyncData sync_data;
- // Don't sync the uninstall if we're going to reinstall the extension
- // momentarily.
- if (extension_sync_service_ &&
- reason != extensions::UNINSTALL_REASON_REINSTALL) {
- sync_data = extension_sync_service_->PrepareToSyncUninstallExtension(
- *extension);
- }
-
InstallVerifier::Get(GetBrowserContext())->Remove(extension->id());
UMA_HISTOGRAM_ENUMERATION("Extensions.UninstallType",
@@ -783,9 +774,11 @@ bool ExtensionService::UninstallExtension(
ExtensionRegistry::Get(profile_)
->TriggerOnUninstalled(extension.get(), reason);
- if (sync_data.IsValid()) {
- extension_sync_service_->ProcessSyncUninstallExtension(extension->id(),
- sync_data);
+ // Don't sync the uninstall if we're going to reinstall the extension
+ // momentarily.
+ if (extension_sync_service_ &&
+ reason != extensions::UNINSTALL_REASON_REINSTALL) {
+ extension_sync_service_->SyncUninstallExtension(*extension);
}
delayed_installs_.Remove(extension->id());
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_sync_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698