summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/extensions/isolated_app_browsertest.cc34
-rw-r--r--chrome/browser/ui/browser.cc1
-rw-r--r--chrome/browser/ui/browser_navigator.cc10
-rw-r--r--chrome/browser/ui/browser_navigator.h4
-rw-r--r--chrome/test/data/extensions/isolated_apps/app1/main.html1
-rw-r--r--chrome/test/data/extensions/isolated_apps/app2/main.html1
-rw-r--r--chrome/test/data/extensions/isolated_apps/non_app/main.html1
-rw-r--r--content/browser/renderer_host/render_view_host_delegate.h6
-rw-r--r--content/browser/renderer_host/render_view_host_impl.cc11
-rw-r--r--content/browser/renderer_host/render_view_host_impl.h6
-rw-r--r--content/browser/renderer_host/transfer_navigation_resource_throttle.cc3
-rw-r--r--content/browser/web_contents/navigation_controller_impl.cc8
-rw-r--r--content/browser/web_contents/navigation_entry_impl.cc4
-rw-r--r--content/browser/web_contents/navigation_entry_impl.h20
-rw-r--r--content/browser/web_contents/web_contents_impl.cc9
-rw-r--r--content/browser/web_contents/web_contents_impl.h6
-rw-r--r--content/common/view_messages.h15
-rw-r--r--content/public/browser/navigation_controller.cc7
-rw-r--r--content/public/browser/navigation_controller.h4
-rw-r--r--content/public/browser/page_navigator.cc9
-rw-r--r--content/public/browser/page_navigator.h4
-rw-r--r--content/public/renderer/navigation_state.cc3
-rw-r--r--content/public/renderer/navigation_state.h13
-rw-r--r--content/renderer/render_view_impl.cc26
24 files changed, 49 insertions, 157 deletions
diff --git a/chrome/browser/extensions/isolated_app_browsertest.cc b/chrome/browser/extensions/isolated_app_browsertest.cc
index e214ba1..5d42e9f 100644
--- a/chrome/browser/extensions/isolated_app_browsertest.cc
+++ b/chrome/browser/extensions/isolated_app_browsertest.cc
@@ -75,40 +75,6 @@ class IsolatedAppTest : public ExtensionBrowserTest {
} // namespace
-IN_PROC_BROWSER_TEST_F(IsolatedAppTest, CrossProcessClientRedirect) {
- host_resolver()->AddRule("*", "127.0.0.1");
- ASSERT_TRUE(test_server()->Start());
-
- ASSERT_TRUE(LoadExtension(test_data_dir_.AppendASCII("isolated_apps/app1")));
- ASSERT_TRUE(LoadExtension(test_data_dir_.AppendASCII("isolated_apps/app2")));
-
- GURL base_url = test_server()->GetURL("files/extensions/isolated_apps/");
- GURL::Replacements replace_host;
- std::string host_str("localhost"); // Must stay in scope with replace_host.
- replace_host.SetHostStr(host_str);
- base_url = base_url.ReplaceComponents(replace_host);
- ui_test_utils::NavigateToURLWithDisposition(
- browser(), base_url.Resolve("app1/main.html"),
- CURRENT_TAB, ui_test_utils::BROWSER_TEST_WAIT_FOR_NAVIGATION);
-
- WebContents* tab0 = chrome::GetWebContentsAt(browser(), 0);
-
- // redirect to app2.
- GURL redirect_url(test_server()->GetURL(
- "client-redirect?files/extensions/isolated_apps/app2/main.html"));
- ui_test_utils::NavigateToURLWithDisposition(
- browser(), redirect_url,
- CURRENT_TAB, ui_test_utils::BROWSER_TEST_WAIT_FOR_NAVIGATION);
-
- const string16 expected_title2 = ASCIIToUTF16("app1");
- content::TitleWatcher title_watcher2(tab0, expected_title2);
- // Go back.
- // If bug fixed, we should go back to app1 instead of the redirect page.
- chrome::GoBack(browser(), CURRENT_TAB);
- string16 actual_title2 = title_watcher2.WaitAndGetTitle();
- EXPECT_EQ(expected_title2, actual_title2);
-}
-
// Tests that cookies set within an isolated app are not visible to normal
// pages or other apps.
//
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index 4af6ddd..2f9f82e 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -1286,7 +1286,6 @@ WebContents* Browser::OpenURLFromTab(WebContents* source,
nav_params.is_renderer_initiated = params.is_renderer_initiated;
nav_params.transferred_global_request_id =
params.transferred_global_request_id;
- nav_params.is_cross_site_redirect = params.is_cross_site_redirect;
chrome::Navigate(&nav_params);
return nav_params.target_contents ?
diff --git a/chrome/browser/ui/browser_navigator.cc b/chrome/browser/ui/browser_navigator.cc
index 5be80e6..80fb7d5 100644
--- a/chrome/browser/ui/browser_navigator.cc
+++ b/chrome/browser/ui/browser_navigator.cc
@@ -227,7 +227,6 @@ void LoadURLInContents(WebContents* target_contents,
load_url_params.referrer = params->referrer;
load_url_params.transition_type = params->transition;
load_url_params.extra_headers = params->extra_headers;
- load_url_params.is_cross_site_redirect = params->is_cross_site_redirect;
if (params->transferred_global_request_id != GlobalRequestID()) {
load_url_params.is_renderer_initiated = params->is_renderer_initiated;
@@ -322,8 +321,7 @@ NavigateParams::NavigateParams(Browser* a_browser,
path_behavior(RESPECT),
ref_behavior(IGNORE_REF),
browser(a_browser),
- initiating_profile(NULL),
- is_cross_site_redirect(false) {
+ initiating_profile(NULL) {
if (a_browser)
host_desktop_type = a_browser->host_desktop_type();
else
@@ -344,8 +342,7 @@ NavigateParams::NavigateParams(Browser* a_browser,
path_behavior(RESPECT),
ref_behavior(IGNORE_REF),
browser(a_browser),
- initiating_profile(NULL),
- is_cross_site_redirect(false) {
+ initiating_profile(NULL) {
if (a_browser)
host_desktop_type = a_browser->host_desktop_type();
else
@@ -369,8 +366,7 @@ NavigateParams::NavigateParams(Profile* a_profile,
ref_behavior(IGNORE_REF),
browser(NULL),
initiating_profile(a_profile),
- host_desktop_type(chrome::HOST_DESKTOP_TYPE_NATIVE),
- is_cross_site_redirect(false) {}
+ host_desktop_type(chrome::HOST_DESKTOP_TYPE_NATIVE) {}
NavigateParams::~NavigateParams() {}
diff --git a/chrome/browser/ui/browser_navigator.h b/chrome/browser/ui/browser_navigator.h
index 931c87f..5df4136 100644
--- a/chrome/browser/ui/browser_navigator.h
+++ b/chrome/browser/ui/browser_navigator.h
@@ -203,10 +203,6 @@ struct NavigateParams {
// explicitly or inferred from an existing Browser instance.
chrome::HostDesktopType host_desktop_type;
- // Indicates whether this navigation involves a cross-process redirect,
- // in which case it should replace the current navigation entry.
- bool is_cross_site_redirect;
-
private:
NavigateParams();
};
diff --git a/chrome/test/data/extensions/isolated_apps/app1/main.html b/chrome/test/data/extensions/isolated_apps/app1/main.html
index bfc9b7d..427902c 100644
--- a/chrome/test/data/extensions/isolated_apps/app1/main.html
+++ b/chrome/test/data/extensions/isolated_apps/app1/main.html
@@ -1,5 +1,4 @@
<html>
-<head><title>app1</title></head>
<body>
Isolated App 1
diff --git a/chrome/test/data/extensions/isolated_apps/app2/main.html b/chrome/test/data/extensions/isolated_apps/app2/main.html
index b578e77..506e874 100644
--- a/chrome/test/data/extensions/isolated_apps/app2/main.html
+++ b/chrome/test/data/extensions/isolated_apps/app2/main.html
@@ -1,5 +1,4 @@
<html>
-<head><title>app2</title></head>
<body>
Isolated App 2
diff --git a/chrome/test/data/extensions/isolated_apps/non_app/main.html b/chrome/test/data/extensions/isolated_apps/non_app/main.html
index 85100c8..ab8c9b31 100644
--- a/chrome/test/data/extensions/isolated_apps/non_app/main.html
+++ b/chrome/test/data/extensions/isolated_apps/non_app/main.html
@@ -1,5 +1,4 @@
<html>
-<head><title>non-app</title></head>
<body>
Normal page
diff --git a/content/browser/renderer_host/render_view_host_delegate.h b/content/browser/renderer_host/render_view_host_delegate.h
index c424f1a..784ea53a 100644
--- a/content/browser/renderer_host/render_view_host_delegate.h
+++ b/content/browser/renderer_host/render_view_host_delegate.h
@@ -239,8 +239,7 @@ class CONTENT_EXPORT RenderViewHostDelegate {
const GURL& url,
const Referrer& referrer,
WindowOpenDisposition disposition,
- int64 source_frame_id,
- bool is_redirect) {}
+ int64 source_frame_id) {}
// The page wants to transfer the request to a new renderer.
virtual void RequestTransferURL(
@@ -248,8 +247,7 @@ class CONTENT_EXPORT RenderViewHostDelegate {
const Referrer& referrer,
WindowOpenDisposition disposition,
int64 source_frame_id,
- const GlobalRequestID& old_request_id,
- bool is_redirect) {}
+ const GlobalRequestID& old_request_id) {}
// The page wants to close the active view in this tab.
virtual void RouteCloseEvent(RenderViewHost* rvh) {}
diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc
index 0f4edac..5209148 100644
--- a/content/browser/renderer_host/render_view_host_impl.cc
+++ b/content/browser/renderer_host/render_view_host_impl.cc
@@ -1364,15 +1364,16 @@ void RenderViewHostImpl::OnMsgToggleFullscreen(bool enter_fullscreen) {
WasResized();
}
-void RenderViewHostImpl::OnMsgOpenURL(
- const ViewHostMsg_OpenURL_Params& params) {
- GURL validated_url(params.url);
+void RenderViewHostImpl::OnMsgOpenURL(const GURL& url,
+ const Referrer& referrer,
+ WindowOpenDisposition disposition,
+ int64 source_frame_id) {
+ GURL validated_url(url);
FilterURL(ChildProcessSecurityPolicyImpl::GetInstance(),
GetProcess(), false, &validated_url);
delegate_->RequestOpenURL(
- this, validated_url, params.referrer, params.disposition, params.frame_id,
- params.is_cross_site_redirect);
+ this, validated_url, referrer, disposition, source_frame_id);
}
void RenderViewHostImpl::OnMsgDidContentsPreferredSizeChange(
diff --git a/content/browser/renderer_host/render_view_host_impl.h b/content/browser/renderer_host/render_view_host_impl.h
index 26c2777..ae8cc82 100644
--- a/content/browser/renderer_host/render_view_host_impl.h
+++ b/content/browser/renderer_host/render_view_host_impl.h
@@ -34,7 +34,6 @@ struct AccessibilityHostMsg_NotificationParams;
struct MediaPlayerAction;
struct ViewHostMsg_CreateWindow_Params;
struct ViewHostMsg_DidFailProvisionalLoadWithError_Params;
-struct ViewHostMsg_OpenURL_Params;
struct ViewHostMsg_ShowPopup_Params;
struct ViewMsg_Navigate_Params;
struct ViewMsg_PostMessage_Params;
@@ -511,7 +510,10 @@ class CONTENT_EXPORT RenderViewHostImpl
void OnMsgDocumentOnLoadCompletedInMainFrame(int32 page_id);
void OnMsgContextMenu(const ContextMenuParams& params);
void OnMsgToggleFullscreen(bool enter_fullscreen);
- void OnMsgOpenURL(const ViewHostMsg_OpenURL_Params& params);
+ void OnMsgOpenURL(const GURL& url,
+ const Referrer& referrer,
+ WindowOpenDisposition disposition,
+ int64 source_frame_id);
void OnMsgDidContentsPreferredSizeChange(const gfx::Size& new_size);
void OnMsgDidChangeScrollbarsForMainFrame(bool has_horizontal_scrollbar,
bool has_vertical_scrollbar);
diff --git a/content/browser/renderer_host/transfer_navigation_resource_throttle.cc b/content/browser/renderer_host/transfer_navigation_resource_throttle.cc
index b623dad..ce06e8a 100644
--- a/content/browser/renderer_host/transfer_navigation_resource_throttle.cc
+++ b/content/browser/renderer_host/transfer_navigation_resource_throttle.cc
@@ -35,8 +35,7 @@ void RequestTransferURLOnUIThread(int render_process_id,
return;
delegate->RequestTransferURL(
- new_url, referrer, window_open_disposition,
- frame_id, global_request_id, false);
+ new_url, referrer, window_open_disposition, frame_id, global_request_id);
}
} // namespace
diff --git a/content/browser/web_contents/navigation_controller_impl.cc b/content/browser/web_contents/navigation_controller_impl.cc
index fc72f9c..694b43d 100644
--- a/content/browser/web_contents/navigation_controller_impl.cc
+++ b/content/browser/web_contents/navigation_controller_impl.cc
@@ -329,7 +329,7 @@ void NavigationControllerImpl::ReloadInternal(bool check_for_repost,
// a reload in the renderer.
reload_type = NavigationController::NO_RELOAD;
- nav_entry->set_should_replace_entry(true);
+ nav_entry->set_is_cross_site_reload(true);
pending_entry_ = nav_entry;
} else {
pending_entry_index_ = current_index;
@@ -658,8 +658,6 @@ void NavigationControllerImpl::LoadURLWithParams(const LoadURLParams& params) {
params.is_renderer_initiated,
params.extra_headers,
browser_context_));
- if (params.is_cross_site_redirect)
- entry->set_should_replace_entry(true);
entry->SetIsOverridingUserAgent(override);
entry->set_transferred_global_request_id(
params.transferred_global_request_id);
@@ -710,10 +708,8 @@ bool NavigationControllerImpl::RendererDidNavigate(
// If we are doing a cross-site reload, we need to replace the existing
// navigation entry, not add another entry to the history. This has the side
// effect of removing forward browsing history, if such existed.
- // Or if we are doing a cross-site redirect navigation,
- // we will do a similar thing.
details->did_replace_entry =
- pending_entry_ && pending_entry_->should_replace_entry();
+ pending_entry_ && pending_entry_->is_cross_site_reload();
// is_in_page must be computed before the entry gets committed.
details->is_in_page = IsURLInPageNavigation(
diff --git a/content/browser/web_contents/navigation_entry_impl.cc b/content/browser/web_contents/navigation_entry_impl.cc
index 53d70aa..d5476ca 100644
--- a/content/browser/web_contents/navigation_entry_impl.cc
+++ b/content/browser/web_contents/navigation_entry_impl.cc
@@ -45,7 +45,7 @@ NavigationEntryImpl::NavigationEntryImpl()
restore_type_(RESTORE_NONE),
is_overriding_user_agent_(false),
is_renderer_initiated_(false),
- should_replace_entry_(false),
+ is_cross_site_reload_(false),
can_load_local_resources_(false) {
}
@@ -70,7 +70,7 @@ NavigationEntryImpl::NavigationEntryImpl(SiteInstanceImpl* instance,
restore_type_(RESTORE_NONE),
is_overriding_user_agent_(false),
is_renderer_initiated_(is_renderer_initiated),
- should_replace_entry_(false),
+ is_cross_site_reload_(false),
can_load_local_resources_(false) {
}
diff --git a/content/browser/web_contents/navigation_entry_impl.h b/content/browser/web_contents/navigation_entry_impl.h
index 0548ca9..795dafa 100644
--- a/content/browser/web_contents/navigation_entry_impl.h
+++ b/content/browser/web_contents/navigation_entry_impl.h
@@ -157,14 +157,13 @@ class CONTENT_EXPORT NavigationEntryImpl
return transferred_global_request_id_;
}
- // Whether this (pending) navigation needs to replace current entry.
+ // Whether this (pending) navigation is reload across site instances.
// Resets to false after commit.
- bool should_replace_entry() const {
- return should_replace_entry_;
+ void set_is_cross_site_reload(bool is_cross_site_reload) {
+ is_cross_site_reload_ = is_cross_site_reload;
}
-
- void set_should_replace_entry(bool should_replace_entry) {
- should_replace_entry_ = should_replace_entry;
+ bool is_cross_site_reload() const {
+ return is_cross_site_reload_;
}
private:
@@ -230,15 +229,10 @@ class CONTENT_EXPORT NavigationEntryImpl
// This is set to true when this entry is being reloaded and due to changes in
// the state of the URL, it has to be reloaded in a different site instance.
- // For the reload case, due to changes in the state of the URL,
- // it has to be reloaded in a different site instance.
+ // In such case, we must treat it as an existing navigation in the new site
// instance, instead of a new navigation. This value should not be persisted
// and is not needed after the entry commits.
- //
- // We also use this flag for cross-process redirect navigations, so that the
- // browser will replace the current navigation entry (which is the page
- // doing the redirect).
- bool should_replace_entry_;
+ bool is_cross_site_reload_;
// Set when this entry should be able to access local file:// resources. This
// value is not needed after the entry commits and is not persisted.
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index ba052a0..0ef81c6 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -2870,8 +2870,7 @@ void WebContentsImpl::RequestOpenURL(RenderViewHost* rvh,
const GURL& url,
const Referrer& referrer,
WindowOpenDisposition disposition,
- int64 source_frame_id,
- bool is_cross_site_redirect) {
+ int64 source_frame_id) {
// If this came from a swapped out RenderViewHost, we only allow the request
// if we are still in the same BrowsingInstance.
if (static_cast<RenderViewHostImpl*>(rvh)->is_swapped_out() &&
@@ -2882,7 +2881,7 @@ void WebContentsImpl::RequestOpenURL(RenderViewHost* rvh,
// Delegate to RequestTransferURL because this is just the generic
// case where |old_request_id| is empty.
RequestTransferURL(url, referrer, disposition, source_frame_id,
- GlobalRequestID(), is_cross_site_redirect);
+ GlobalRequestID());
}
void WebContentsImpl::RequestTransferURL(
@@ -2890,8 +2889,7 @@ void WebContentsImpl::RequestTransferURL(
const Referrer& referrer,
WindowOpenDisposition disposition,
int64 source_frame_id,
- const GlobalRequestID& old_request_id,
- bool is_cross_site_redirect) {
+ const GlobalRequestID& old_request_id) {
WebContents* new_contents = NULL;
PageTransition transition_type = PAGE_TRANSITION_LINK;
if (render_manager_.web_ui()) {
@@ -2913,7 +2911,6 @@ void WebContentsImpl::RequestTransferURL(
OpenURLParams params(url, referrer, source_frame_id, disposition,
PAGE_TRANSITION_LINK, true /* is_renderer_initiated */);
params.transferred_global_request_id = old_request_id;
- params.is_cross_site_redirect = is_cross_site_redirect;
new_contents = OpenURL(params);
}
if (new_contents) {
diff --git a/content/browser/web_contents/web_contents_impl.h b/content/browser/web_contents/web_contents_impl.h
index 11bff14..4bfaf17 100644
--- a/content/browser/web_contents/web_contents_impl.h
+++ b/content/browser/web_contents/web_contents_impl.h
@@ -344,15 +344,13 @@ class CONTENT_EXPORT WebContentsImpl
const GURL& url,
const Referrer& referrer,
WindowOpenDisposition disposition,
- int64 source_frame_id,
- bool is_cross_site_redirect) OVERRIDE;
+ int64 source_frame_id) OVERRIDE;
virtual void RequestTransferURL(
const GURL& url,
const Referrer& referrer,
WindowOpenDisposition disposition,
int64 source_frame_id,
- const GlobalRequestID& transferred_global_request_id,
- bool is_cross_site_redirect) OVERRIDE;
+ const GlobalRequestID& transferred_global_request_id) OVERRIDE;
virtual void RouteCloseEvent(RenderViewHost* rvh) OVERRIDE;
virtual void RouteMessageEvent(
RenderViewHost* rvh,
diff --git a/content/common/view_messages.h b/content/common/view_messages.h
index e76eaa8..5bc1079 100644
--- a/content/common/view_messages.h
+++ b/content/common/view_messages.h
@@ -745,15 +745,6 @@ IPC_STRUCT_BEGIN(ViewMsg_Navigate_Params)
IPC_STRUCT_MEMBER(bool, can_load_local_resources)
IPC_STRUCT_END()
-// Parameters for an OpenURL request.
-IPC_STRUCT_BEGIN(ViewHostMsg_OpenURL_Params)
- IPC_STRUCT_MEMBER(GURL, url)
- IPC_STRUCT_MEMBER(content::Referrer, referrer)
- IPC_STRUCT_MEMBER(WindowOpenDisposition, disposition)
- IPC_STRUCT_MEMBER(int64, frame_id)
- IPC_STRUCT_MEMBER(bool, is_cross_site_redirect)
-IPC_STRUCT_END()
-
IPC_STRUCT_BEGIN(ViewMsg_New_Params)
// Renderer-wide preferences.
IPC_STRUCT_MEMBER(content::RendererPreferences, renderer_preferences)
@@ -1905,7 +1896,11 @@ IPC_SYNC_MESSAGE_ROUTED4_2(ViewHostMsg_RunJavaScriptMessage,
string16 /* out - user_input field */)
// Requests that the given URL be opened in the specified manner.
-IPC_MESSAGE_ROUTED1(ViewHostMsg_OpenURL, ViewHostMsg_OpenURL_Params)
+IPC_MESSAGE_ROUTED4(ViewHostMsg_OpenURL,
+ GURL /* url */,
+ content::Referrer /* referrer */,
+ WindowOpenDisposition /* disposition */,
+ int64 /* frame id */)
// Notifies that the preferred size of the content changed.
IPC_MESSAGE_ROUTED1(ViewHostMsg_DidContentsPreferredSizeChange,
diff --git a/content/public/browser/navigation_controller.cc b/content/public/browser/navigation_controller.cc
index 5fc56dc..4c9ba58 100644
--- a/content/public/browser/navigation_controller.cc
+++ b/content/public/browser/navigation_controller.cc
@@ -15,8 +15,7 @@ NavigationController::LoadURLParams::LoadURLParams(const GURL& url)
is_renderer_initiated(false),
override_user_agent(UA_OVERRIDE_INHERIT),
browser_initiated_post_data(NULL),
- can_load_local_resources(false),
- is_cross_site_redirect(false) {
+ can_load_local_resources(false) {
}
NavigationController::LoadURLParams::~LoadURLParams() {
@@ -34,8 +33,7 @@ NavigationController::LoadURLParams::LoadURLParams(
transferred_global_request_id(other.transferred_global_request_id),
base_url_for_data_url(other.base_url_for_data_url),
virtual_url_for_data_url(other.virtual_url_for_data_url),
- browser_initiated_post_data(other.browser_initiated_post_data),
- is_cross_site_redirect(false) {
+ browser_initiated_post_data(other.browser_initiated_post_data) {
}
NavigationController::LoadURLParams&
@@ -52,7 +50,6 @@ NavigationController::LoadURLParams::operator=(
base_url_for_data_url = other.base_url_for_data_url;
virtual_url_for_data_url = other.virtual_url_for_data_url;
browser_initiated_post_data = other.browser_initiated_post_data;
- is_cross_site_redirect = other.is_cross_site_redirect;
return *this;
}
diff --git a/content/public/browser/navigation_controller.h b/content/public/browser/navigation_controller.h
index d37960b..8a64d48 100644
--- a/content/public/browser/navigation_controller.h
+++ b/content/public/browser/navigation_controller.h
@@ -151,10 +151,6 @@ class NavigationController {
// True if this URL should be able to access local resources.
bool can_load_local_resources;
- // Indicates whether this navigation involves a cross-process redirect,
- // in which case it should replace the current navigation entry.
- bool is_cross_site_redirect;
-
explicit LoadURLParams(const GURL& url);
~LoadURLParams();
diff --git a/content/public/browser/page_navigator.cc b/content/public/browser/page_navigator.cc
index 608b2d0..029afbc 100644
--- a/content/public/browser/page_navigator.cc
+++ b/content/public/browser/page_navigator.cc
@@ -17,8 +17,7 @@ OpenURLParams::OpenURLParams(
source_frame_id(-1),
disposition(disposition),
transition(transition),
- is_renderer_initiated(is_renderer_initiated),
- is_cross_site_redirect(false) {
+ is_renderer_initiated(is_renderer_initiated) {
}
OpenURLParams::OpenURLParams(
@@ -33,16 +32,14 @@ OpenURLParams::OpenURLParams(
source_frame_id(source_frame_id),
disposition(disposition),
transition(transition),
- is_renderer_initiated(is_renderer_initiated),
- is_cross_site_redirect(false) {
+ is_renderer_initiated(is_renderer_initiated) {
}
OpenURLParams::OpenURLParams()
: source_frame_id(-1),
disposition(UNKNOWN),
transition(PageTransitionFromInt(0)),
- is_renderer_initiated(false),
- is_cross_site_redirect(false) {
+ is_renderer_initiated(false) {
}
OpenURLParams::~OpenURLParams() {
diff --git a/content/public/browser/page_navigator.h b/content/public/browser/page_navigator.h
index bc716df..90eaef6 100644
--- a/content/public/browser/page_navigator.h
+++ b/content/public/browser/page_navigator.h
@@ -64,10 +64,6 @@ struct CONTENT_EXPORT OpenURLParams {
// transferred to a new renderer.
GlobalRequestID transferred_global_request_id;
- // Indicates whether this navigation involves a cross-process redirect,
- // in which case it should replace the current navigation entry.
- bool is_cross_site_redirect;
-
private:
OpenURLParams();
};
diff --git a/content/public/renderer/navigation_state.cc b/content/public/renderer/navigation_state.cc
index 37fcfb7..9208efa 100644
--- a/content/public/renderer/navigation_state.cc
+++ b/content/public/renderer/navigation_state.cc
@@ -18,8 +18,7 @@ NavigationState::NavigationState(content::PageTransition transition_type,
was_within_same_page_(false),
transferred_request_child_id_(-1),
transferred_request_request_id_(-1),
- allow_download_(true),
- is_redirect_in_progress_(false) {
+ allow_download_(true) {
}
NavigationState::~NavigationState() {}
diff --git a/content/public/renderer/navigation_state.h b/content/public/renderer/navigation_state.h
index 58a6534..f13b9b7 100644
--- a/content/public/renderer/navigation_state.h
+++ b/content/public/renderer/navigation_state.h
@@ -78,12 +78,6 @@ class NavigationState {
bool allow_download() const {
return allow_download_;
}
- void set_is_redirect_in_progress(bool value) {
- is_redirect_in_progress_ = value;
- }
- bool is_redirect_in_progress() const {
- return is_redirect_in_progress_;
- }
private:
NavigationState(content::PageTransition transition_type,
@@ -102,13 +96,6 @@ class NavigationState {
int transferred_request_request_id_;
bool allow_download_;
- // If we are handling a top-level client-side redirect, we need to set this
- // to true when calling willPerformClientRedirect.
- // If DecidePolicyForNavigation decides this redirect is a cross-process
- // navigation, it will pass this flag to the browser process through OpenURL,
- // which will eventually replace the current navigation entry.
- bool is_redirect_in_progress_;
-
DISALLOW_COPY_AND_ASSIGN(NavigationState);
};
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
index 540b063..36ea321 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -1661,17 +1661,12 @@ void RenderViewImpl::OpenURL(WebFrame* frame,
const GURL& url,
const Referrer& referrer,
WebNavigationPolicy policy) {
- ViewHostMsg_OpenURL_Params params;
- params.url = url;
- params.referrer = referrer;
- params.disposition = NavigationPolicyToDisposition(policy);
- params.frame_id = frame->identifier();
- DocumentState* document_state =
- DocumentState::FromDataSource(frame->dataSource());
- params.is_cross_site_redirect =
- document_state->navigation_state()->is_redirect_in_progress();
-
- Send(new ViewHostMsg_OpenURL(routing_id_, params));
+ Send(new ViewHostMsg_OpenURL(
+ routing_id_,
+ url,
+ referrer,
+ NavigationPolicyToDisposition(policy),
+ frame->identifier()));
}
// WebViewDelegate ------------------------------------------------------------
@@ -2965,10 +2960,6 @@ void RenderViewImpl::willPerformClientRedirect(
double fire_time) {
// Replace any occurrences of swappedout:// with about:blank.
const WebURL& blank_url = GURL(chrome::kAboutBlankURL);
- DocumentState* document_state =
- DocumentState::FromDataSource(frame->dataSource());
- document_state->navigation_state()->set_is_redirect_in_progress(true);
-
FOR_EACH_OBSERVER(
RenderViewObserver, observers_,
WillPerformClientRedirect(frame,
@@ -2977,10 +2968,6 @@ void RenderViewImpl::willPerformClientRedirect(
}
void RenderViewImpl::didCancelClientRedirect(WebFrame* frame) {
- DocumentState* document_state =
- DocumentState::FromDataSource(frame->dataSource());
- document_state->navigation_state()->set_is_redirect_in_progress(false);
-
FOR_EACH_OBSERVER(
RenderViewObserver, observers_, DidCancelClientRedirect(frame));
}
@@ -3415,7 +3402,6 @@ void RenderViewImpl::didCommitProvisionalLoad(WebFrame* frame,
// If this committed load was initiated by a client redirect, we're
// at the last stop now, so clear it.
completed_client_redirect_src_ = Referrer();
- navigation_state->set_is_redirect_in_progress(false);
// Check whether we have new encoding name.
UpdateEncoding(frame, frame->view()->pageEncoding().utf8());