Chromium Code Reviews| 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 { |