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

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

Issue 2966573003: Set UA override flag for Renderer-initiated NavigationRequest (Closed)
Patch Set: Created 3 years, 6 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 | « content/browser/frame_host/navigation_request.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/frame_host/navigator_impl.cc
diff --git a/content/browser/frame_host/navigator_impl.cc b/content/browser/frame_host/navigator_impl.cc
index 82689769f56d82e08abd174f236bfb1c218386e6..07163766a2165bf950a6059ed48d76084f87bb94 100644
--- a/content/browser/frame_host/navigator_impl.cc
+++ b/content/browser/frame_host/navigator_impl.cc
@@ -1019,11 +1019,14 @@ void NavigatorImpl::OnBeginNavigation(
navigation_data_.reset();
}
NavigationEntryImpl* pending_entry = controller_->GetPendingEntry();
+ NavigationEntryImpl* current_entry = controller_->GetLastCommittedEntry();
+ bool override_user_agent =
+ current_entry ? current_entry->GetIsOverridingUserAgent() : false;
frame_tree_node->CreatedNavigationRequest(
NavigationRequest::CreateRendererInitiated(
frame_tree_node, pending_entry, common_params, begin_params,
controller_->GetLastCommittedEntryIndex(),
- controller_->GetEntryCount()));
+ controller_->GetEntryCount(), override_user_agent));
NavigationRequest* navigation_request = frame_tree_node->navigation_request();
// For main frames, NavigationHandle will be created after the call to
« no previous file with comments | « content/browser/frame_host/navigation_request.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698