Commit 0f3229d0 authored by mrefaat's avatar mrefaat Committed by Commit Bot

Update viewForTab to use BVC own tabmodel

Previously it used to use tab.tabmodel which is going to be deleted.

Bug: 899839
Change-Id: I86584dfcd6bae44b289585fe1562c2f160715406
Reviewed-on: https://chromium-review.googlesource.com/c/1321669
Commit-Queue: Mohammad Refaat <mrefaat@chromium.org>
Reviewed-by: default avataredchin <edchin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#611294}
parent 2541683b
......@@ -2644,9 +2644,10 @@ applicationCommandEndpoint:(id<ApplicationCommands>)applicationCommandEndpoint
if (NTPHelper && NTPHelper->IsActive()) {
return _ntpCoordinatorsForWebStates[webState].viewController.view;
}
DCHECK([self.tabModel indexOfTab:tab] != NSNotFound);
// TODO(crbug.com/904588): Move |RecordPageLoadStart| to TabUsageRecorder.
if (webState->IsEvicted() && [tab.parentTabModel tabUsageRecorder]) {
[tab.parentTabModel tabUsageRecorder]->RecordPageLoadStart(webState);
if (webState->IsEvicted() && [self.tabModel tabUsageRecorder]) {
[self.tabModel tabUsageRecorder] -> RecordPageLoadStart(webState);
}
if (!webState->IsCrashed()) {
// Load the page if it was evicted by browsing data clearing logic.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment