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

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

Issue 10414035: Move TransferNavigationResourceThrottle to content since that's where it belongs. This is a step in… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: review comments Created 8 years, 7 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 | « content/browser/renderer_host/transfer_navigation_resource_throttle.h ('k') | content/content_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/transfer_navigation_resource_throttle.cc
===================================================================
--- content/browser/renderer_host/transfer_navigation_resource_throttle.cc (revision 138143)
+++ content/browser/renderer_host/transfer_navigation_resource_throttle.cc (working copy)
@@ -2,16 +2,14 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/renderer_host/transfer_navigation_resource_throttle.h"
+#include "content/browser/renderer_host/transfer_navigation_resource_throttle.h"
#include "base/bind.h"
-#include "chrome/browser/extensions/extension_info_map.h"
-#include "chrome/browser/profiles/profile_io_data.h"
-#include "chrome/common/extensions/extension_process_policy.h"
+#include "content/browser/renderer_host/resource_dispatcher_host_impl.h"
+#include "content/public/browser/content_browser_client.h"
#include "content/public/browser/global_request_id.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/render_view_host_delegate.h"
-#include "content/public/browser/resource_dispatcher_host.h"
#include "content/public/browser/resource_request_info.h"
#include "content/public/common/referrer.h"
#include "net/url_request/url_request.h"
@@ -19,7 +17,7 @@
using content::GlobalRequestID;
using content::Referrer;
using content::RenderViewHostDelegate;
-using content::ResourceDispatcherHost;
+using content::ResourceDispatcherHostImpl;
using content::ResourceRequestInfo;
namespace {
@@ -57,8 +55,6 @@
void TransferNavigationResourceThrottle::WillRedirectRequest(
const GURL& new_url,
bool* defer) {
- // TODO(darin): Move this logic into src/content.
-
const ResourceRequestInfo* info = ResourceRequestInfo::ForRequest(request_);
// If a toplevel request is redirecting across extension extents, we want to
@@ -67,13 +63,11 @@
// to host the new URL.
// TODO(mpcomplete): handle for cases other than extensions (e.g. WebUI).
content::ResourceContext* resource_context = info->GetContext();
- ProfileIOData* io_data = ProfileIOData::FromResourceContext(resource_context);
- if (extensions::CrossesExtensionProcessBoundary(
- io_data->GetExtensionInfoMap()->extensions(),
- ExtensionURLInfo(request_->url()), ExtensionURLInfo(new_url))) {
+ if (content::GetContentClient()->browser()->ShouldSwapProcessesForRedirect(
+ resource_context, request_->url(), new_url)) {
int render_process_id, render_view_id;
if (info->GetAssociatedRenderView(&render_process_id, &render_view_id)) {
- ResourceDispatcherHost::Get()->MarkAsTransferredNavigation(request_);
+ ResourceDispatcherHostImpl::Get()->MarkAsTransferredNavigation(request_);
GlobalRequestID global_id(info->GetChildID(), info->GetRequestID());
content::BrowserThread::PostTask(
« no previous file with comments | « content/browser/renderer_host/transfer_navigation_resource_throttle.h ('k') | content/content_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698