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

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

Issue 1279543002: Support needed to measure user and service traffic in Chrome. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@NewHistogram
Patch Set: Created 5 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 | chrome/browser/net/data_use_measurement.h » ('j') | chrome/browser/net/data_use_measurement.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « no previous file | chrome/browser/net/data_use_measurement.h » ('j') | chrome/browser/net/data_use_measurement.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698