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..d3631f76820514a630fe8a05eceb316e1c7c0350 100644 |
--- a/extensions/browser/renderer_startup_helper.cc |
+++ b/extensions/browser/renderer_startup_helper.cc |
@@ -11,6 +11,7 @@ |
#include "content/public/browser/render_process_host.h" |
#include "extensions/browser/extension_function_dispatcher.h" |
#include "extensions/browser/extension_registry.h" |
+#include "extensions/browser/extension_util.h" |
#include "extensions/browser/extensions_browser_client.h" |
#include "extensions/browser/guest_view/web_view/web_view_guest.h" |
#include "extensions/common/extension_messages.h" |
@@ -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 |
+ // started. |
+ // The value is sent to all renderers, as the non-extension renderers may have |
+ // content scripts. |
+ process->Send(new ExtensionMsg_SetUserSessionType( |
+ extensions::util::GetCurrentSessionType())); |
rkc
2016/08/17 23:07:24
This can be GetCurrentFeatureSessionType() instead
tbarzic
2016/08/18 01:05:33
Done.
|
+ |
// 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(), |