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

Unified Diff: net/url_request/url_request.cc

Issue 10837123: Add histograms to NetworkChangeNotifier to identify ways to improve interface (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address szym's comments and nits. Created 8 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 | « net/base/network_change_notifier.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_request.cc
diff --git a/net/url_request/url_request.cc b/net/url_request/url_request.cc
index 8ea6325d819e072b5ad455b4c68867c90b7fa131..713e153139bea71e20ef67aad429ac94fb381fe5 100644
--- a/net/url_request/url_request.cc
+++ b/net/url_request/url_request.cc
@@ -20,6 +20,7 @@
#include "net/base/load_flags.h"
#include "net/base/net_errors.h"
#include "net/base/net_log.h"
+#include "net/base/network_change_notifier.h"
#include "net/base/network_delegate.h"
#include "net/base/ssl_cert_request_info.h"
#include "net/base/upload_data.h"
@@ -879,6 +880,11 @@ void URLRequest::NotifyReadCompleted(int bytes_read) {
if (bytes_read <= 0)
NotifyRequestCompleted();
+ // Notify NetworkChangeNotifier that we just received network data.
+ // This is to identify cases where the NetworkChangeNotifier thinks we
+ // are off-line but we are still receiving network data (crbug.com/124069).
+ NetworkChangeNotifier::NotifyDataReceived(url());
+
if (delegate_)
delegate_->OnReadCompleted(this, bytes_read);
« no previous file with comments | « net/base/network_change_notifier.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698