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

Unified Diff: chrome/browser/net/chrome_extensions_network_delegate.cc

Issue 464933002: Don't increment lazy keep alive count on redirects. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Only filter out redirects on REQUEST_START. Created 6 years, 4 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: chrome/browser/net/chrome_extensions_network_delegate.cc
diff --git a/chrome/browser/net/chrome_extensions_network_delegate.cc b/chrome/browser/net/chrome_extensions_network_delegate.cc
index cbc9654ddea608e3895ee59068ab370df5e0b89e..66c0c01c2cca9fc017fa250a575835295217197f 100644
--- a/chrome/browser/net/chrome_extensions_network_delegate.cc
+++ b/chrome/browser/net/chrome_extensions_network_delegate.cc
@@ -65,6 +65,11 @@ void ForwardRequestStatus(
if (!info)
return;
+ if (status == REQUEST_STARTED && request->url_chain().size() > 1) {
+ // It's a redirect, this request has already been counted.
+ return;
+ }
+
int process_id, render_frame_id;
if (info->GetAssociatedRenderFrame(&process_id, &render_frame_id)) {
BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
« 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