Commit 5c77455a authored by rajendrant's avatar rajendrant Committed by Commit Bot

Add more checks for data use ascriber

Bug: 781189
Change-Id: I1472076e579a94fe14c0ee1aa6d52d1d7cf0931f
Reviewed-on: https://chromium-review.googlesource.com/801541Reviewed-by: default avatarRyan Sturm <ryansturm@chromium.org>
Commit-Queue: rajendrant <rajendrant@chromium.org>
Cr-Commit-Position: refs/heads/master@{#521102}
parent ebdba3f2
......@@ -393,6 +393,9 @@ void ChromeDataUseAscriber::DidFinishMainFrameNavigation(
main_frame_it->second.data_use_recorder;
old_frame_entry->set_page_transition(page_transition);
if (old_frame_entry == entry)
return;
if (is_same_document_navigation) {
std::vector<net::URLRequest*> pending_url_requests;
entry->GetPendingURLRequests(&pending_url_requests);
......@@ -402,6 +405,7 @@ void ChromeDataUseAscriber::DidFinishMainFrameNavigation(
DataUseRecorderEntryAsUserData::kDataUseAscriberUserDataKey);
AscribeRecorderWithRequest(request, old_frame_entry);
}
entry->RemoveAllPendingURLRequests();
DCHECK(entry->IsDataUseComplete());
data_use_recorders_.erase(entry);
......
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