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

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

Issue 2779263002: Set user agent type of transient item the same as pending item. (Closed)
Patch Set: removed unused includes 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/navigation/navigation_manager_impl.mm
diff --git a/ios/web/navigation/navigation_manager_impl.mm b/ios/web/navigation/navigation_manager_impl.mm
index a9e42e85157e6e0aab693ee103ae6ee809afc2b3..75061730fa363d02e3b813ba9ae1b5655d47d7a3 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());
+ DCHECK(GetPendingItem()->GetUserAgentType() != UserAgentType::NONE);
Eugene But (OOO till 7-30) 2017/03/30 23:01:49 DCHECK_NE
liaoyuke 2017/03/31 15:50:12 Done.
+ GetTransientItem()->SetUserAgentType(GetPendingItem()->GetUserAgentType());
+}
+
void NavigationManagerImpl::AddPendingItem(
const GURL& url,
const web::Referrer& referrer,
« ios/web/navigation/navigation_manager_impl.h ('K') | « ios/web/navigation/navigation_manager_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698