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

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

Issue 2823623002: Remove usage of Tab's |url| property from TabModel. (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/browser/tabs/tab_model.mm
diff --git a/ios/chrome/browser/tabs/tab_model.mm b/ios/chrome/browser/tabs/tab_model.mm
index c08186dc5fd2f508c753ea99c448da51bb734eee..73284463194f123cf7aad8b8002d9e476b04dd3d 100644
--- a/ios/chrome/browser/tabs/tab_model.mm
+++ b/ios/chrome/browser/tabs/tab_model.mm
@@ -610,8 +610,9 @@ - (NSSet*)currentlyReferencedExternalFiles {
return referencedFiles;
// Check the currently open tabs for external files.
for (Tab* tab in self) {
- if (UrlIsExternalFileReference(tab.url)) {
- NSString* fileName = base::SysUTF8ToNSString(tab.url.ExtractFileName());
+ const GURL& URL = tab.lastCommittedURL;
+ if (UrlIsExternalFileReference(URL)) {
+ NSString* fileName = base::SysUTF8ToNSString(URL.ExtractFileName());
kkhorimoto 2017/04/14 20:37:40 A file is currently reference if it's in the conte
Eugene But (OOO till 7-30) 2017/04/14 21:46:10 Should we include both lastCommitted and pending?
kkhorimoto 2017/05/31 22:30:04 Done.
[referencedFiles addObject:fileName];
}
}
@@ -772,7 +773,7 @@ - (BOOL)restoreSessionWindow:(SessionWindowIOS*)window
BOOL closedNTPTab = NO;
if (oldCount == 1) {
Tab* tab = [self tabAtIndex:0];
- if (tab.url == GURL(kChromeUINewTabURL)) {
+ if (tab.lastCommittedURL == GURL(kChromeUINewTabURL)) {
kkhorimoto 2017/04/14 20:37:40 Loads aren't occurring during session restoration,
sdefresne 2017/04/18 15:54:34 This is also called when restoring a session after
kkhorimoto 2017/05/31 22:30:04 Done.
[self closeTab:tab];
closedNTPTab = YES;
oldCount = 0;
« 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