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