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

Unified Diff: content/browser/frame_host/navigation_controller_impl.cc

Issue 2619063003: Update viewport_meta setting on any navigation. (Closed)
Patch Set: Created 3 years, 11 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698