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

Unified Diff: ios/chrome/browser/ui/browser_view_controller.mm

Issue 2723683002: Test URL instead of VirtualURL in [BVC isTabNativePage] (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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/ui/browser_view_controller.mm
diff --git a/ios/chrome/browser/ui/browser_view_controller.mm b/ios/chrome/browser/ui/browser_view_controller.mm
index 9b3b3afa3ff9a8cbe9cf40f7fc6d4b47c8adb8b0..9f8fc6bcf9695c0ba20d50a05e0976dc95cc02e7 100644
--- a/ios/chrome/browser/ui/browser_view_controller.mm
+++ b/ios/chrome/browser/ui/browser_view_controller.mm
@@ -2054,7 +2054,12 @@ class BrowserBookmarkModelBridge : public bookmarks::BookmarkModelObserver {
// Whether the given tab's url begins with the chrome prefix.
- (BOOL)isTabNativePage:(Tab*)tab {
- return tab && tab.url.SchemeIs(kChromeUIScheme);
+ return tab && tab.webState && tab.webState->GetNavigationManager() &&
Eugene But (OOO till 7-30) 2017/02/28 16:32:59 Optional nit: How about using local variables and
Eugene But (OOO till 7-30) 2017/02/28 16:33:00 |tab && | check is redundant, because if tab is ni
kkhorimoto 2017/02/28 18:50:29 Can we use GetWebClient()->IsAppSpecificURL() here
Olivier 2017/03/01 14:46:14 Done.
+ tab.webState->GetNavigationManager()->GetVisibleItem() &&
+ tab.webState->GetNavigationManager()
+ ->GetVisibleItem()
+ ->GetURL()
+ .SchemeIs(kChromeUIScheme);
}
- (void)expectNewForegroundTab {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698