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

Unified Diff: content/browser/loader/cross_site_resource_handler.cc

Issue 1144463003: Remove Navigation Transitions from Chromium (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed TransitionPageHelper. Created 5 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
Index: content/browser/loader/cross_site_resource_handler.cc
diff --git a/content/browser/loader/cross_site_resource_handler.cc b/content/browser/loader/cross_site_resource_handler.cc
index ccdd321ef3362af8fe3dcca1c08eb856a004ad93..ebf40eb023a6abfd0047b64e11de9ef04dd57eb7 100644
--- a/content/browser/loader/cross_site_resource_handler.cc
+++ b/content/browser/loader/cross_site_resource_handler.cc
@@ -16,7 +16,6 @@
#include "content/browser/loader/resource_dispatcher_host_impl.h"
#include "content/browser/loader/resource_request_info_impl.h"
#include "content/browser/site_instance_impl.h"
-#include "content/browser/transition_request_manager.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/content_browser_client.h"
#include "content/public/browser/global_request_id.h"
@@ -86,16 +85,6 @@ void OnCrossSiteResponseHelper(const CrossSiteResponseParams& params) {
}
}
-void OnDeferredAfterResponseStartedHelper(
- const GlobalRequestID& global_request_id,
- int render_frame_id,
- const TransitionLayerData& transition_data) {
- RenderFrameHostImpl* rfh =
- RenderFrameHostImpl::FromID(global_request_id.child_id, render_frame_id);
- if (rfh)
- rfh->OnDeferredAfterResponseStarted(global_request_id, transition_data);
-}
-
// Returns whether a transfer is needed by doing a check on the UI thread.
bool CheckNavigationPolicyOnUI(GURL url, int process_id, int render_frame_id) {
CHECK(base::CommandLine::ForCurrentProcess()->HasSwitch(
@@ -156,22 +145,7 @@ bool CrossSiteResourceHandler::OnResponseStarted(
ResourceRequestInfoImpl* info = GetRequestInfo();
info->set_cross_site_handler(this);
- TransitionLayerData transition_data;
- bool is_navigation_transition =
- TransitionRequestManager::GetInstance()->GetPendingTransitionRequest(
- info->GetChildID(), info->GetRenderFrameID(), request()->url(),
- &transition_data);
-
- if (is_navigation_transition) {
- if (response_.get())
- transition_data.response_headers = response_->head.headers;
- transition_data.request_url = request()->url();
-
- return OnNavigationTransitionResponseStarted(response, defer,
- transition_data);
- } else {
- return OnNormalResponseStarted(response, defer);
- }
+ return OnNormalResponseStarted(response, defer);
}
bool CrossSiteResourceHandler::OnNormalResponseStarted(
@@ -241,37 +215,6 @@ bool CrossSiteResourceHandler::OnNormalResponseStarted(
return true;
}
-bool CrossSiteResourceHandler::OnNavigationTransitionResponseStarted(
- ResourceResponse* response,
- bool* defer,
- const TransitionLayerData& transition_data) {
- ResourceRequestInfoImpl* info = GetRequestInfo();
-
- GlobalRequestID global_id(info->GetChildID(), info->GetRequestID());
- int render_frame_id = info->GetRenderFrameID();
- BrowserThread::PostTask(
- BrowserThread::UI,
- FROM_HERE,
- base::Bind(
- &OnDeferredAfterResponseStartedHelper,
- global_id,
- render_frame_id,
- transition_data));
-
- *defer = true;
- OnDidDefer();
- return true;
-}
-
-void CrossSiteResourceHandler::ResumeResponseDeferredAtStart(int request_id) {
- bool defer = false;
- if (!OnNormalResponseStarted(response_.get(), &defer)) {
- controller()->Cancel();
- } else if (!defer) {
- ResumeIfDeferred();
- }
-}
-
void CrossSiteResourceHandler::ResumeOrTransfer(bool is_transfer) {
if (is_transfer) {
StartCrossSiteTransition(response_.get());
« no previous file with comments | « content/browser/loader/cross_site_resource_handler.h ('k') | content/browser/loader/resource_dispatcher_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698