Index: chrome/browser/extensions/extension_util.cc |
diff --git a/chrome/browser/extensions/extension_util.cc b/chrome/browser/extensions/extension_util.cc |
index 8cf30d46feae30ee57ece1d0a80ac6b349edfc30..29479c49fd36413729793797c2cf13f73bd7eaf9 100644 |
--- a/chrome/browser/extensions/extension_util.cc |
+++ b/chrome/browser/extensions/extension_util.cc |
@@ -99,6 +99,11 @@ void SetAllowedScriptingOnAllUrlsHelper( |
updater.GrantWithheldImpliedAllHosts(extension); |
else |
updater.WithholdImpliedAllHosts(extension); |
+ |
+ // If this was an update to permissions, we also need to sync the change. |
+ ExtensionSyncService* sync_service = ExtensionSyncService::Get(context); |
+ if (sync_service) // sync_service can be null in unittests. |
+ sync_service->SyncExtensionChangeIfNeeded(*extension); |
} |
} |
} |