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

Unified Diff: extensions/browser/renderer_startup_helper.cc

Issue 2241203003: Pass user session type to extension feature checks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Pass user session type to extension renderer Created 4 years, 3 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
« no previous file with comments | « chrome/browser/chromeos/login/users/chrome_user_manager_impl.cc ('k') | extensions/common/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..c200c27a2dd843ec4e6fa83d24ef74f875f9c21a 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;
@@ -66,9 +67,11 @@ void RendererStartupHelper::InitializeProcess(
new ExtensionMsg_SetActivityLoggingEnabled(activity_logging_enabled));
}
- // Extensions need to know the channel for API restrictions. Send the channel
- // to all renderers, as the non-extension renderers may have content scripts.
- process->Send(new ExtensionMsg_SetChannel(GetCurrentChannel()));
+ // Extensions need to know the channel and the session type for API
+ // restrictions. The values are sent to all renderers, as the non-extension
+ // renderers may have content scripts.
+ process->Send(new ExtensionMsg_SetSessionInfo(
+ GetCurrentChannel(), GetCurrentFeatureSessionType()));
// Platform apps need to know the system font.
// TODO(dbeam): this is not the system font in all cases.
« no previous file with comments | « chrome/browser/chromeos/login/users/chrome_user_manager_impl.cc ('k') | extensions/common/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698