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

Unified Diff: extensions/browser/renderer_startup_helper.cc

Issue 2499493004: Communicate ExtensionSettings policy to renderers (Closed)
Patch Set: Fix effective TLD wildcard bug, move to Leaky LazyInstance in PermissionsData, removed unnecessary … Created 3 years, 9 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 c200c27a2dd843ec4e6fa83d24ef74f875f9c21a..d8dae0fc4ba3db46be0de6d5b7f030d85110f5a4 100644
--- a/extensions/browser/renderer_startup_helper.cc
+++ b/extensions/browser/renderer_startup_helper.cc
@@ -18,6 +18,8 @@
#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 "ipc/ipc_message_attachment_set.h"
#include "ui/base/webui/web_ui_util.h"
using content::BrowserContext;
@@ -91,6 +93,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;
const ExtensionSet& extensions =

Powered by Google App Engine
This is Rietveld 408576698