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

Unified Diff: content/browser/renderer_host/render_message_filter.cc

Issue 7135003: Remove last extension dependencies from content. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: oops Created 9 years, 6 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: content/browser/renderer_host/render_message_filter.cc
diff --git a/content/browser/renderer_host/render_message_filter.cc b/content/browser/renderer_host/render_message_filter.cc
index 83385fc349e6b534b1a629fa531a95dd716fc01b..9abbcccff78a34b6e73adb800d2229cd9ca872f1 100644
--- a/content/browser/renderer_host/render_message_filter.cc
+++ b/content/browser/renderer_host/render_message_filter.cc
@@ -15,7 +15,6 @@
#include "chrome/browser/browser_process.h"
#include "chrome/browser/download/download_types.h"
#include "chrome/browser/download/download_util.h"
-#include "chrome/browser/extensions/extension_info_map.h"
#include "chrome/browser/notifications/desktop_notification_service.h"
#include "chrome/browser/notifications/desktop_notification_service_factory.h"
#include "chrome/browser/profiles/profile.h"
@@ -389,14 +388,11 @@ void RenderMessageFilter::OnMsgCreateWindow(
int* route_id, int64* cloned_session_storage_namespace_id) {
// If the opener is trying to create a background window but doesn't have
// the appropriate permission, fail the attempt.
- if (params.window_container_type == WINDOW_CONTAINER_TYPE_BACKGROUND) {
- const Extension* extension =
- extension_info_map_->extensions().GetByURL(params.opener_url);
- if (!extension ||
- !extension->HasApiPermission(Extension::kBackgroundPermission)) {
- *route_id = MSG_ROUTING_NONE;
- return;
- }
+ if (params.window_container_type == WINDOW_CONTAINER_TYPE_BACKGROUND &&
+ !content::GetContentClient()->browser()->
+ CheckBackgroundPermission(params.opener_url, resource_context_)) {
+ *route_id = MSG_ROUTING_NONE;
+ return;
}
*cloned_session_storage_namespace_id =

Powered by Google App Engine
This is Rietveld 408576698