Chromium Code Reviews| Index: ios/web/navigation/crw_session_controller.mm |
| diff --git a/ios/web/navigation/crw_session_controller.mm b/ios/web/navigation/crw_session_controller.mm |
| index 292d9fc3eb2275fe8fe977f737e694619c28b546..4434bd99627dd7ee995d7093af760716963c7e5a 100644 |
| --- a/ios/web/navigation/crw_session_controller.mm |
| +++ b/ios/web/navigation/crw_session_controller.mm |
| @@ -282,9 +282,11 @@ - (void)setBrowserState:(web::BrowserState*)browserState { |
| } |
| - (void)addPendingItem:(const GURL&)url |
| - referrer:(const web::Referrer&)ref |
| - transition:(ui::PageTransition)trans |
| - initiationType:(web::NavigationInitiationType)initiationType { |
| + referrer:(const web::Referrer&)ref |
| + transition:(ui::PageTransition)trans |
| + initiationType:(web::NavigationInitiationType)initiationType |
| + userAgentOverrideOption:(web::NavigationManager::UserAgentOverrideOption) |
| + userAgentOverrideOption { |
| // Server side redirects are handled by updating existing pending item instead |
| // of adding a new item. |
| DCHECK((trans & ui::PAGE_TRANSITION_SERVER_REDIRECT) == 0); |
| @@ -312,6 +314,10 @@ - (void)addPendingItem:(const GURL&)url |
| !hasSameURL || |
| (isPendingTransitionFormSubmit && !isCurrentTransitionFormSubmit); |
| + if (userAgentOverrideOption != |
| + web::NavigationManager::UserAgentOverrideOption::INHERIT) |
|
kkhorimoto
2017/04/05 23:01:44
I think we should also check whether the override
liaoyuke
2017/04/06 22:24:55
Theoretically, override option should always be di
|
| + shouldCreatePendingItem = YES; |
| + |
| if (!shouldCreatePendingItem) { |
| // Send the notification anyway, to preserve old behavior. It's unknown |
| // whether anything currently relies on this, but since both this whole |