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

Unified Diff: ios/chrome/browser/tabs/tab.mm

Issue 2711733007: Revert of (Set)IsOverridingUserAgent should be called on VisibleItem (Closed)
Patch Set: 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
« no previous file with comments | « ios/chrome/browser/tabs/tab.h ('k') | ios/chrome/browser/ui/browser_view_controller.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/tabs/tab.mm
diff --git a/ios/chrome/browser/tabs/tab.mm b/ios/chrome/browser/tabs/tab.mm
index 2071164fd042e4ae786830f8d313b1ea9659dda1..a6eda18221461e7f4268aae932b9dd11ecab1fdc 100644
--- a/ios/chrome/browser/tabs/tab.mm
+++ b/ios/chrome/browser/tabs/tab.mm
@@ -1567,16 +1567,13 @@
[storeKitLauncher_ openAppStore:appId];
}
-- (BOOL)usesDesktopUserAgent {
- if (!self.navigationManager)
- return NO;
-
- web::NavigationItem* visibleItem = self.navigationManager->GetVisibleItem();
- return visibleItem && visibleItem->IsOverridingUserAgent();
+- (BOOL)useDesktopUserAgent {
+ web::NavigationItem* currentItem = self.currentNavigationItem;
+ return currentItem && currentItem->IsOverridingUserAgent();
}
- (void)enableDesktopUserAgent {
- DCHECK_EQ(self.usesDesktopUserAgent, NO);
+ DCHECK_EQ(self.useDesktopUserAgent, NO);
DCHECK([self navigationManager]);
[self navigationManager]->OverrideDesktopUserAgentForNextPendingItem();
}
« no previous file with comments | « ios/chrome/browser/tabs/tab.h ('k') | ios/chrome/browser/ui/browser_view_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698