diff options
author | davidben@chromium.org <davidben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-11-19 04:33:42 +0000 |
---|---|---|
committer | davidben@chromium.org <davidben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-11-19 04:33:42 +0000 |
commit | 4972fc82e6b6df8da332275d541bcead15d5a65e (patch) | |
tree | adac31a2be698268a6c03599251c4f4601345364 /content/browser/loader/resource_request_info_impl.h | |
parent | be12cc446c38f5d149318e8282dd32b726c02640 (diff) | |
download | chromium_src-4972fc82e6b6df8da332275d541bcead15d5a65e.zip chromium_src-4972fc82e6b6df8da332275d541bcead15d5a65e.tar.gz chromium_src-4972fc82e6b6df8da332275d541bcead15d5a65e.tar.bz2 |
Preserve should_replace_current_entry across request transfers.
When a request transfer happens, we lose the should_replace_current_entry bit
of the navigation. This results in us getting history wrong when, say, a hosted
Google Calendar app is installed and we client-redirect to it while not logged
in, triggering a server redirect to accounts.google.com and a request transfer.
Push this state down to the renderer into NavigationState so it can be
stapled to the request, bubbled back up to the CrossSiteResourceHandler and
into the transferred navigation.
Also test and fix a case where the state does not round-trip correctly if a
fresh renderer with a browser-initiated navigation decides to fork the
navigation back up to the browser anyway.
BUG=311721
TEST=SitePerProcessBrowserTest.ReplaceEntryCrossProcessThenTransfers
SitePerProcessBrowserTest.ReplaceEntryInProcessThenTransfers
SitePerProcessBrowserTest.ReplaceEntryCrossProcessTwice
Review URL: https://codereview.chromium.org/71993002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@235918 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/loader/resource_request_info_impl.h')
-rw-r--r-- | content/browser/loader/resource_request_info_impl.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/content/browser/loader/resource_request_info_impl.h b/content/browser/loader/resource_request_info_impl.h index 3da351a..b6f8563 100644 --- a/content/browser/loader/resource_request_info_impl.h +++ b/content/browser/loader/resource_request_info_impl.h @@ -49,6 +49,7 @@ class ResourceRequestInfoImpl : public ResourceRequestInfo, int64 parent_frame_id, ResourceType::Type resource_type, PageTransition transition_type, + bool should_replace_current_entry, bool is_download, bool is_stream, bool allow_download, @@ -109,6 +110,13 @@ class ResourceRequestInfoImpl : public ResourceRequestInfo, cross_site_handler_ = h; } + // Whether this request is part of a navigation that should replace the + // current session history entry. This state is shuffled up and down the stack + // for request transfers. + bool should_replace_current_entry() const { + return should_replace_current_entry_; + } + // Identifies the type of process (renderer, plugin, etc.) making the request. int process_type() const { return process_type_; } @@ -145,6 +153,7 @@ class ResourceRequestInfoImpl : public ResourceRequestInfo, int64 frame_id_; bool parent_is_main_frame_; int64 parent_frame_id_; + bool should_replace_current_entry_; bool is_download_; bool is_stream_; bool allow_download_; |