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

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

Issue 907533004: [Extensions] Sync the 'allowed scripting on all urls' preference (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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
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);
}
}
}
« no previous file with comments | « chrome/browser/extensions/extension_sync_service.cc ('k') | chrome/browser/sync/test/integration/two_client_apps_sync_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698