Index: chrome/browser/extensions/extension_util.cc |
diff --git a/chrome/browser/extensions/extension_util.cc b/chrome/browser/extensions/extension_util.cc |
index c4d4ce503636302118ba1ed60b8d5db543f9f88c..c0b018b1e4612f011f7efac7c722d9ff447bbcfa 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); |
} |
} |
} |