Chromium Code Reviews| Index: content/browser/frame_host/navigation_controller_impl.cc |
| diff --git a/content/browser/frame_host/navigation_controller_impl.cc b/content/browser/frame_host/navigation_controller_impl.cc |
| index 5bde4bb4340d76cb67cc37f410824c5a814269d9..c7e009d3ff39d8d004dc5ca29b775893ccea87f2 100644 |
| --- a/content/browser/frame_host/navigation_controller_impl.cc |
| +++ b/content/browser/frame_host/navigation_controller_impl.cc |
| @@ -803,9 +803,14 @@ bool NavigationControllerImpl::RendererDidNavigate( |
| is_initial_navigation_ = false; |
| // Save the previous state before we clobber it. |
| + bool overriding_user_agent_changed = false; |
| if (GetLastCommittedEntry()) { |
| details->previous_url = GetLastCommittedEntry()->GetURL(); |
| details->previous_entry_index = GetLastCommittedEntryIndex(); |
| + if (pending_entry_ && |
| + pending_entry_->GetIsOverridingUserAgent() != |
| + GetLastCommittedEntry()->GetIsOverridingUserAgent()) |
| + overriding_user_agent_changed = true; |
| } else { |
| details->previous_url = GURL(); |
| details->previous_entry_index = -1; |
| @@ -953,6 +958,9 @@ bool NavigationControllerImpl::RendererDidNavigate( |
| NotifyNavigationEntryCommitted(details); |
| + if (overriding_user_agent_changed) |
| + delegate_->UpdateOverridingUserAgent(); |
|
nasko
2017/01/09 23:07:53
Technically this should only be called if we actua
aelias_OOO_until_Jul13
2017/01/09 23:10:52
Right. Could you give me a more concrete suggesti
nasko
2017/01/09 23:44:03
Yes. The switch statement on 850 calls a specific
aelias_OOO_until_Jul13
2017/01/10 01:17:43
OK, done. Note that I needed to change the underl
|
| + |
| // Update the nav_entry_id for each RenderFrameHost in the tree, so that each |
| // one knows the latest NavigationEntry it is showing (whether it has |
| // committed anything in this navigation or not). This allows things like |