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

Unified Diff: ios/web/web_state/ui/crw_web_controller.mm

Issue 2779383002: implement user agent override option. (Closed)
Patch Set: Rebase Created 3 years, 9 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: ios/web/web_state/ui/crw_web_controller.mm
diff --git a/ios/web/web_state/ui/crw_web_controller.mm b/ios/web/web_state/ui/crw_web_controller.mm
index b959f8a6b18874a996791ea2fe4cfbfbd57cb58e..62ff91e23ebe5f606e1e89373967bc5e6d8fa0a7 100644
--- a/ios/web/web_state/ui/crw_web_controller.mm
+++ b/ios/web/web_state/ui/crw_web_controller.mm
@@ -1493,7 +1493,8 @@ - (void)registerLoadRequest:(const GURL&)requestURL
// A new session history entry needs to be created.
self.navigationManagerImpl->AddPendingItem(
requestURL, referrer, transition,
- web::NavigationInitiationType::RENDERER_INITIATED);
+ web::NavigationInitiationType::RENDERER_INITIATED,
+ web::NavigationManager::UserAgentOverrideOption::INHERIT);
}
_webStateImpl->SetIsLoading(true);
_webStateImpl->OnProvisionalNavigationStarted(requestURL);
@@ -1819,7 +1820,8 @@ - (void)loadWithParams:(const NavigationManager::WebLoadParams&)originalParams {
? web::NavigationInitiationType::RENDERER_INITIATED
: web::NavigationInitiationType::USER_INITIATED;
self.navigationManagerImpl->AddPendingItem(
- navUrl, params.referrer, transition, navigationInitiationType);
+ navUrl, params.referrer, transition, navigationInitiationType,
+ params.user_agent_override_option);
web::NavigationItemImpl* addedItem = self.currentNavItem;
DCHECK(addedItem);
« no previous file with comments | « ios/web/public/test/fakes/test_navigation_manager.mm ('k') | ios/web/web_state/ui/crw_web_controller_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698