Index: extensions/browser/renderer_startup_helper.cc |
diff --git a/extensions/browser/renderer_startup_helper.cc b/extensions/browser/renderer_startup_helper.cc |
index 452c816963ddd1b509e6b12ea30c540b9b7ce566..4311172206652cd58de81ad9df06703c09eafc1c 100644 |
--- a/extensions/browser/renderer_startup_helper.cc |
+++ b/extensions/browser/renderer_startup_helper.cc |
@@ -17,6 +17,7 @@ |
#include "extensions/common/extension_set.h" |
#include "extensions/common/extensions_client.h" |
#include "extensions/common/features/feature_channel.h" |
+#include "extensions/common/features/feature_session_type.h" |
#include "ui/base/webui/web_ui_util.h" |
using content::BrowserContext; |
@@ -70,6 +71,14 @@ void RendererStartupHelper::InitializeProcess( |
// to all renderers, as the non-extension renderers may have content scripts. |
process->Send(new ExtensionMsg_SetChannel(GetCurrentChannel())); |
+ // Extensions need to know the session type for API restrictions. The session |
+ // type is determined based on the user for which the current session is |
Devlin
2016/08/18 17:19:15
omit "The session type is determined..." - that's
|
+ // started. |
+ // The value is sent to all renderers, as the non-extension renderers may have |
+ // content scripts. |
+ process->Send( |
Devlin
2016/08/18 17:19:15
IPCs aren't free, and I think it's probably cheape
|
+ new ExtensionMsg_SetUserSessionType(GetCurrentFeatureSessionType())); |
+ |
// Platform apps need to know the system font. |
// TODO(dbeam): this is not the system font in all cases. |
process->Send(new ExtensionMsg_SetSystemFont(webui::GetFontFamily(), |