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

Unified Diff: ios/chrome/app/main_controller.mm

Issue 2822753002: Remove usage of Tab's |url| property from MainController. (Closed)
Patch Set: Created 3 years, 8 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/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];
« 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