Commit 026aeaa9 authored by Sylvain Defresne's avatar Sylvain Defresne Committed by Commit Bot

Cleanup unnecessary code

Recent refactoring moved this code out of TabModel in multiple
object. The navigation_item initialized here is not used. The
code using it is in OmniboxGeolocationTabHelper.

Bug: none
Change-Id: I4ca760b95e6f5882c4783d4e65f1c1036998176b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2461232Reviewed-by: default avatarDavid Jean <djean@chromium.org>
Commit-Queue: Sylvain Defresne <sdefresne@chromium.org>
Cr-Commit-Position: refs/heads/master@{#815556}
parent 93f98384
......@@ -131,28 +131,6 @@ void WebStateListMetricsBrowserAgent::DidStartNavigation(
crash_util::ResetFailedStartupAttemptCount();
});
}
DCHECK(web_state->GetNavigationManager());
web::NavigationItem* navigation_item =
web_state->GetNavigationManager()->GetPendingItem();
// TODO(crbug.com/676129): the pending item is not correctly set when the
// page is reloading, use the last committed item if pending item is null.
// Remove this once tracking bug is fixed.
if (!navigation_item) {
navigation_item = web_state->GetNavigationManager()->GetLastCommittedItem();
}
if (!navigation_item) {
// Pending item may not exist due to the bug in //ios/web layer.
// TODO(crbug.com/899827): remove this early return once GetPendingItem()
// always return valid object inside WebStateObserver::DidStartNavigation()
// callback.
//
// Note that GetLastCommittedItem() returns null if navigation manager does
// not have committed items (which is normal situation).
return;
}
}
void WebStateListMetricsBrowserAgent::DidFinishNavigation(
......
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