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

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

Issue 2619063003: Update viewport_meta setting on any navigation. (Closed)
Patch Set: Another EXPECT_EQ -> EXPECT_FALSE 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 | content/browser/frame_host/navigation_controller_impl_unittest.cc » ('j') | 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();
+
// 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 | content/browser/frame_host/navigation_controller_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698