Support needed to measure user and service traffic in Chrome.
commit092adb2451c74c4dc97e1808bfbe2352ad21da9d
authoramohammadkhan <amohammadkhan@google.com>
Fri, 11 Sep 2015 21:08:49 +0000 (11 14:08 -0700)
committerCommit bot <commit-bot@chromium.org>
Fri, 11 Sep 2015 21:09:37 +0000 (11 21:09 +0000)
tree8832e9ae0a4d016cb5f19a963349eb59095f8366
parent1376735743584fda54c75099363b13f779604193
Support needed to measure user and service traffic in Chrome.

Some of the traffic of Chrome is not coming from direct request of user and it
comes from services running on it such as Sync, Suggestion, or Complete. To
understand their contribution to total amount of Chrome traffic, it is necessary
to record services traffic use besides the user traffic use.

To be able to get more useful data, it is also necessary to record the condition
in which the request is made and the response is received. Two important aspects
are the connection type (Cellular or Wifi) and application state (Foreground or
Background). Also it is helpful to have the distribution of exchanged message
size for different directions (Upload or Download).

Besides the needed support for measuring, the suggestion service code is
instrumented to record its data use. This instrumentation is done as an example
and if this CL lands other target services will be instrumented too.

BUG=516434

Review URL: https://codereview.chromium.org/1279543002

Cr-Commit-Position: refs/heads/master@{#348490}
27 files changed:
chrome/browser/BUILD.gn
chrome/browser/net/DEPS
chrome/browser/net/chrome_network_delegate.cc
chrome/browser/net/chrome_network_delegate.h
chrome/browser/net/chrome_network_delegate_unittest.cc
chrome/chrome_browser.gypi
chrome/chrome_tests_unit.gypi
chrome/test/BUILD.gn
components/OWNERS
components/components.gyp
components/components_tests.gyp
components/data_use_measurement.gypi [new file with mode: 0644]
components/data_use_measurement/OWNERS [new file with mode: 0644]
components/data_use_measurement/content/BUILD.gn [new file with mode: 0644]
components/data_use_measurement/content/DEPS [new file with mode: 0644]
components/data_use_measurement/content/data_use_measurement.cc [new file with mode: 0644]
components/data_use_measurement/content/data_use_measurement.h [new file with mode: 0644]
components/data_use_measurement/content/data_use_measurement_unittest.cc [new file with mode: 0644]
components/data_use_measurement/core/BUILD.gn [new file with mode: 0644]
components/data_use_measurement/core/DEPS [new file with mode: 0644]
components/data_use_measurement/core/data_use_user_data.cc [new file with mode: 0644]
components/data_use_measurement/core/data_use_user_data.h [new file with mode: 0644]
components/suggestions.gypi
components/suggestions/BUILD.gn
components/suggestions/DEPS
components/suggestions/suggestions_service.cc
tools/metrics/histograms/histograms.xml