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

Unified Diff: extensions/browser/mojo/service_registration.cc

Issue 2241203003: Pass user session type to extension feature checks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: split out some stuff Created 4 years, 4 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/mojo/service_registration.cc
diff --git a/extensions/browser/mojo/service_registration.cc b/extensions/browser/mojo/service_registration.cc
index a23a53cec7e72a674fb2b5d18591fb7f776c1238..0fb2fb2ddc6268bd5354f317e6ef3caadd5339bf 100644
--- a/extensions/browser/mojo/service_registration.cc
+++ b/extensions/browser/mojo/service_registration.cc
@@ -13,6 +13,7 @@
#include "content/public/browser/site_instance.h"
#include "extensions/browser/api/serial/serial_service_factory.h"
#include "extensions/browser/extension_registry.h"
+#include "extensions/browser/extension_util.h"
#include "extensions/browser/extensions_browser_client.h"
#include "extensions/browser/mojo/keep_alive_impl.h"
#include "extensions/browser/process_map.h"
@@ -37,7 +38,8 @@ bool ExtensionHasPermission(const Extension* extension,
->GetMostLikelyContextType(extension, render_process_host->GetID());
return ExtensionAPI::GetSharedInstance()
- ->IsAvailable(permission_name, extension, context, extension->url())
+ ->IsAvailable(permission_name, extension, context,
+ util::GetCurrentSessionType(), extension->url())
.is_available();
}

Powered by Google App Engine
This is Rietveld 408576698