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

Unified Diff: chrome/browser/renderer_host/chrome_render_message_filter.cc

Issue 7384008: Revert 92668 - Remove more unnecessary ChromeURLRequestContext members. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 5 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: chrome/browser/renderer_host/chrome_render_message_filter.cc
===================================================================
--- chrome/browser/renderer_host/chrome_render_message_filter.cc (revision 92669)
+++ chrome/browser/renderer_host/chrome_render_message_filter.cc (working copy)
@@ -13,7 +13,6 @@
#include "chrome/browser/download/mhtml_generation_manager.h"
#include "chrome/browser/extensions/extension_event_router.h"
#include "chrome/browser/extensions/extension_function_dispatcher.h"
-#include "chrome/browser/extensions/extension_info_map.h"
#include "chrome/browser/extensions/extension_message_service.h"
#include "chrome/browser/metrics/histogram_synchronizer.h"
#include "chrome/browser/nacl_host/nacl_process_host.h"
@@ -84,7 +83,6 @@
: render_process_id_(render_process_id),
profile_(profile),
request_context_(request_context),
- extension_info_map_(profile->GetExtensionInfoMap()),
weak_ptr_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)) {
allow_outdated_plugins_.Init(prefs::kPluginsAllowOutdated,
profile_->GetPrefs(), NULL);
@@ -300,8 +298,11 @@
void ChromeRenderMessageFilter::OnGetExtensionMessageBundle(
const std::string& extension_id, IPC::Message* reply_msg) {
+ ChromeURLRequestContext* context = static_cast<ChromeURLRequestContext*>(
+ request_context_->GetURLRequestContext());
+
const Extension* extension =
- extension_info_map_->extensions().GetByID(extension_id);
+ context->extension_info_map()->extensions().GetByID(extension_id);
FilePath extension_path;
std::string default_locale;
if (extension) {
@@ -381,8 +382,10 @@
const ExtensionHostMsg_Request_Params& params) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
+ ChromeURLRequestContext* context = static_cast<ChromeURLRequestContext*>(
+ request_context_->GetURLRequestContext());
ExtensionFunctionDispatcher::DispatchOnIOThread(
- extension_info_map_, profile_, render_process_id_,
+ context->extension_info_map(), profile_, render_process_id_,
weak_ptr_factory_.GetWeakPtr(), routing_id, params);
}
@@ -494,18 +497,22 @@
void ChromeRenderMessageFilter::OnCanTriggerClipboardRead(const GURL& url,
bool* allowed) {
+ ChromeURLRequestContext* context = static_cast<ChromeURLRequestContext*>(
+ request_context_->GetURLRequestContext());
const Extension* extension =
- extension_info_map_->extensions().GetByURL(url);
+ context->extension_info_map()->extensions().GetByURL(url);
*allowed = extension &&
extension->HasAPIPermission(ExtensionAPIPermission::kClipboardRead);
}
void ChromeRenderMessageFilter::OnCanTriggerClipboardWrite(const GURL& url,
bool* allowed) {
+ ChromeURLRequestContext* context = static_cast<ChromeURLRequestContext*>(
+ request_context_->GetURLRequestContext());
// Since all extensions could historically write to the clipboard, preserve it
// for compatibility.
const Extension* extension =
- extension_info_map_->extensions().GetByURL(url);
+ context->extension_info_map()->extensions().GetByURL(url);
*allowed = url.SchemeIs(chrome::kExtensionScheme) ||
(extension &&
extension->HasAPIPermission(ExtensionAPIPermission::kClipboardWrite));
« no previous file with comments | « chrome/browser/renderer_host/chrome_render_message_filter.h ('k') | chrome/browser/ui/webui/chrome_url_data_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698