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

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

Issue 2711683002: (Set)IsOverridingUserAgent should be called on VisibleItem (Closed)
Patch Set: Rename function names Created 3 years, 10 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 140c760468abf0f45fe5fdaa6d512dbb8b08ed32..3fe9e20b19b3141203d251f97fca1f9b86bb7ef0 100644
--- a/ios/web/navigation/navigation_manager_impl.mm
+++ b/ios/web/navigation/navigation_manager_impl.mm
@@ -420,6 +420,10 @@ bool AreURLsInPageNavigation(const GURL& existing_url, const GURL& new_url) {
return result;
}
+bool NavigationManagerImpl::IsUsingDesktopUserAgent() const {
+ return GetVisibleItem() && GetVisibleItem()->IsOverridingUserAgent();
Eugene But (OOO till 7-30) 2017/02/22 21:57:42 Why Visible? Should this be LastCommittedItem? Acc
kkhorimoto 2017/02/22 22:54:15 When reviewing, I was looking at the places this i
Eugene But (OOO till 7-30) 2017/02/22 23:13:56 Makes sense. Yuke, please update header comments t
liaoyuke 2017/02/22 23:48:31 Done.
liaoyuke 2017/02/22 23:48:31 Acknowledged.
liaoyuke 2017/02/22 23:48:31 Isn't it the case that CRWWebController also uses
Eugene But (OOO till 7-30) 2017/02/23 00:03:13 So this statement made me rethink this approach. Q
+}
+
void NavigationManagerImpl::OverrideDesktopUserAgentForNextPendingItem() {
if (GetPendingItem())
GetPendingItem()->SetIsOverridingUserAgent(true);

Powered by Google App Engine
This is Rietveld 408576698