Chromium Code Reviews| Index: ios/web/navigation/navigation_manager_impl.mm |
| diff --git a/ios/web/navigation/navigation_manager_impl.mm b/ios/web/navigation/navigation_manager_impl.mm |
| index b1cb00ee08f28b94e62bc900685036b21e46650e..2e6b6ab336926d0c0bf02e527d4a2acb5bdae9c6 100644 |
| --- a/ios/web/navigation/navigation_manager_impl.mm |
| +++ b/ios/web/navigation/navigation_manager_impl.mm |
| @@ -170,6 +170,16 @@ bool AreURLsInPageNavigation(const GURL& existing_url, const GURL& new_url) { |
| delegate_->GetWebState()->OpenURL(params); |
| } |
| +void NavigationManagerImpl::AddTransientItem(const GURL& url) { |
| + [session_controller_ addTransientItemWithURL:url]; |
| + DCHECK(GetTransientItem()); |
| + |
| + // Transient item can only be added for pending non-app-specific loads. |
| + DCHECK(GetPendingItem()); |
|
Eugene But (OOO till 7-30)
2017/03/31 18:33:00
nit: No need to DCHECK, the next line will crash a
liaoyuke
2017/04/04 17:25:01
Done.
|
| + DCHECK_NE(UserAgentType::NONE, GetPendingItem()->GetUserAgentType()); |
| + GetTransientItem()->SetUserAgentType(GetPendingItem()->GetUserAgentType()); |
| +} |
| + |
| void NavigationManagerImpl::AddPendingItem( |
| const GURL& url, |
| const web::Referrer& referrer, |