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

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

Issue 2711683002: (Set)IsOverridingUserAgent should be called on VisibleItem (Closed)
Patch Set: Update function name 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/chrome/browser/tabs/tab.mm
diff --git a/ios/chrome/browser/tabs/tab.mm b/ios/chrome/browser/tabs/tab.mm
index a6eda18221461e7f4268aae932b9dd11ecab1fdc..0d69467328dc7ac5bd2fbe16d9d7a285dba85adf 100644
--- a/ios/chrome/browser/tabs/tab.mm
+++ b/ios/chrome/browser/tabs/tab.mm
@@ -1567,13 +1567,13 @@ - (void)openAppStore:(NSString*)appId {
[storeKitLauncher_ openAppStore:appId];
}
-- (BOOL)useDesktopUserAgent {
- web::NavigationItem* currentItem = self.currentNavigationItem;
- return currentItem && currentItem->IsOverridingUserAgent();
+- (BOOL)isUsingDesktopUserAgent {
+ web::NavigationItem* visibleItem = [self navigationManager]->GetVisibleItem();
+ return visibleItem && visibleItem->IsOverridingUserAgent();
}
- (void)enableDesktopUserAgent {
- DCHECK_EQ(self.useDesktopUserAgent, NO);
+ DCHECK_EQ(self.usesDesktopUserAgent, NO);
DCHECK([self navigationManager]);
[self navigationManager]->OverrideDesktopUserAgentForNextPendingItem();
}

Powered by Google App Engine
This is Rietveld 408576698