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

Unified Diff: extensions/browser/renderer_startup_helper.cc

Issue 2833843004: Reland: Communicate ExtensionSettings policy to renderers (Closed)
Patch Set: Removed unused URLPatternSet parameters in ExtensionMsg_PermissionSetStruct which was causing MSAN … Created 3 years, 8 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: extensions/browser/renderer_startup_helper.cc
diff --git a/extensions/browser/renderer_startup_helper.cc b/extensions/browser/renderer_startup_helper.cc
index 30bd75ee9f641ef9e29e2208b8fd765c09ea7777..55f6509a199e2ef7658982a326552d989d511594 100644
--- a/extensions/browser/renderer_startup_helper.cc
+++ b/extensions/browser/renderer_startup_helper.cc
@@ -23,6 +23,7 @@
#include "extensions/common/extensions_client.h"
#include "extensions/common/features/feature_channel.h"
#include "extensions/common/features/feature_session_type.h"
+#include "extensions/common/permissions/permissions_data.h"
#include "ui/base/webui/web_ui_util.h"
using content::BrowserContext;
@@ -123,6 +124,15 @@ void RendererStartupHelper::InitializeProcess(
WebViewGuest::GetPartitionID(process)));
}
+ // Load default policy_blocked_hosts and policy_allowed_hosts settings, part
+ // of the ExtensionSettings policy.
+ ExtensionMsg_UpdateDefaultPolicyHostRestrictions_Params params;
+ params.default_policy_blocked_hosts =
+ PermissionsData::default_policy_blocked_hosts();
+ params.default_policy_allowed_hosts =
+ PermissionsData::default_policy_allowed_hosts();
+ process->Send(new ExtensionMsg_UpdateDefaultPolicyHostRestrictions(params));
+
// Loaded extensions.
std::vector<ExtensionMsg_Loaded_Params> loaded_extensions;
BrowserContext* renderer_context = process->GetBrowserContext();
« no previous file with comments | « chrome/test/data/extensions/api_test/content_scripts/policy/manifest.json ('k') | extensions/common/constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698