Chromium Code Reviews| Index: ios/chrome/app/main_controller.mm |
| diff --git a/ios/chrome/app/main_controller.mm b/ios/chrome/app/main_controller.mm |
| index 25c25d81a5e68f0154c9c3d02a013151cf9ed176..23f767791b223c20da91c29668cd485cd2bdc05e 100644 |
| --- a/ios/chrome/app/main_controller.mm |
| +++ b/ios/chrome/app/main_controller.mm |
| @@ -2229,13 +2229,9 @@ - (Tab*)openOrReuseTabInMode:(ApplicationMode)targetMode |
| transition:(ui::PageTransition)transition { |
| BrowserViewController* targetBVC = |
| targetMode == ApplicationMode::NORMAL ? self.mainBVC : self.otrBVC; |
| - GURL currentURL; |
| Tab* currentTabInTargetBVC = [[targetBVC tabModel] currentTab]; |
| - if (currentTabInTargetBVC) |
| - currentURL = [currentTabInTargetBVC url]; |
| - |
| - if (!(currentTabInTargetBVC && IsURLNtp(currentURL))) { |
| + if (!(currentTabInTargetBVC && IsURLNtp(currentTabInTargetBVC.visibleURL))) { |
|
kkhorimoto
2017/04/14 20:27:23
We want to return the current Tab if no navigation
Eugene But (OOO till 7-30)
2017/04/14 21:38:36
But NTP can not be pending, or transient, right? I
kkhorimoto
2017/05/31 23:02:08
If the visible URL is not the NTP URL, that means
|
| return [targetBVC addSelectedTabWithURL:URL |
| atIndex:NSNotFound |
| transition:transition]; |