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

Unified Diff: ios/web/navigation/navigation_manager_impl.mm

Issue 2931833004: Always set the navigation pending item for page reload. (Closed)
Patch Set: only reload cases 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
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 bb034a6aad5da39ca51c6f30064e4995608802ea..e48b89ae1c516a05ec7090a84be5dc029bb88eee 100644
--- a/ios/web/navigation/navigation_manager_impl.mm
+++ b/ios/web/navigation/navigation_manager_impl.mm
@@ -148,12 +148,8 @@ void NavigationManagerImpl::LoadURL(const GURL& url,
void NavigationManagerImpl::AddTransientItem(const GURL& url) {
[session_controller_ addTransientItemWithURL:url];
- // TODO(crbug.com/676129): Transient item is only supposed to be added for
- // pending non-app-specific loads, but pending item can be null because of the
- // bug. The workaround should be removed once the bug is fixed.
NavigationItem* item = GetPendingItem();
- if (!item)
- item = GetLastCommittedNonAppSpecificItem();
+ DCHECK(item);
Eugene But (OOO till 7-30) 2017/06/15 00:08:11 nit: No need for DCHECK before dereferencing the p
mrefaat 2017/06/15 18:35:35 Done.
DCHECK(item->GetUserAgentType() != UserAgentType::NONE);
GetTransientItem()->SetUserAgentType(item->GetUserAgentType());
}

Powered by Google App Engine
This is Rietveld 408576698