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

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

Issue 2619063003: Update viewport_meta setting on any navigation. (Closed)
Patch Set: Move to RendererDidNavigateToExistingPage 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
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..5a3d24baaff0ead84ee2c90604c797c5fa0a673c 100644
--- a/content/browser/frame_host/navigation_controller_impl.cc
+++ b/content/browser/frame_host/navigation_controller_impl.cc
@@ -1219,6 +1219,12 @@ void NavigationControllerImpl::RendererDidNavigateToExistingPage(
// SSLStatus.
if (!is_in_page)
entry->GetSSL() = handle->ssl_status();
+
+ // Back/forward navigations can alter "request desktop site" state.
+ if (entry && GetLastCommittedEntry() &&
+ entry->GetIsOverridingUserAgent() !=
+ GetLastCommittedEntry()->GetIsOverridingUserAgent())
+ delegate_->UpdateOverridingUserAgent();
} else {
// This is renderer-initiated. The only kinds of renderer-initated
// navigations that are EXISTING_PAGE are reloads and location.replace,
« no previous file with comments | « no previous file | content/browser/web_contents/web_contents_impl.cc » ('j') | content/browser/web_contents/web_contents_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698