Chromium Code Reviews| Index: chrome/browser/net/chrome_network_delegate.cc |
| diff --git a/chrome/browser/net/chrome_network_delegate.cc b/chrome/browser/net/chrome_network_delegate.cc |
| index c86931cb3bf8d25602259b320f04ef0ecfb7dc5a..6ec7221977fd644ed0e77d315501180f2d756c9f 100644 |
| --- a/chrome/browser/net/chrome_network_delegate.cc |
| +++ b/chrome/browser/net/chrome_network_delegate.cc |
| @@ -30,6 +30,7 @@ |
| #include "chrome/browser/custom_handlers/protocol_handler_registry.h" |
| #include "chrome/browser/net/chrome_extensions_network_delegate.h" |
| #include "chrome/browser/net/connect_interceptor.h" |
| +#include "chrome/browser/net/data_use_measurement.h" |
| #include "chrome/browser/net/request_source_bandwidth_histograms.h" |
| #include "chrome/browser/net/safe_search_util.h" |
| #include "chrome/browser/profiles/profile_manager.h" |
| @@ -487,6 +488,14 @@ void ChromeNetworkDelegate::OnRawBytesRead(const net::URLRequest& request, |
| void ChromeNetworkDelegate::OnCompleted(net::URLRequest* request, |
| bool started) { |
| + // We have assumed that all the request for user contents and for services |
|
bengr
2015/08/07 18:00:00
Don't personify code. Also, don't assume. How abou
amohammadkhan
2015/08/11 22:04:34
Done.
|
| + // are passing this path. So we record All the data use here and later in |
| + // ReportDataUsage function, ALL traffic is divided to two sub-categories of |
| + // USER_DATA and NOT_USER_DATA. Notice to the fact that detailed usage |
| + // statistics of services is not gathered here and it is recorded in |
| + // OnURLFetchComplete function of those services. |
| + ReportDataUsage(request); |
| + |
| RecordNetworkErrorHistograms(request); |
| if (started) { |
| // Only call in for requests that were started, to obey the precondition |