Data use of a URL request is marked as foreground vs background depending on the current state of the app. Instead, it should be marked as whatever state the app was in when the url request was created.
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/da6c2ca5df87b5f74c615c45f8b5b6faf82cb158 commit da6c2ca5df87b5f74c615c45f8b5b6faf82cb158 Author: rajendrant <rajendrant@chromium.org> Date: Tue Sep 27 06:13:18 2016 Fix foregound vs background data use measurement The application state when the request was created should be used to record foreground vs background data use. Currently, application state at the time of data use is used. BUG= 648808 Review-Url: https://codereview.chromium.org/2358663004 Cr-Commit-Position: refs/heads/master@{#421126} [modify] https://crrev.com/da6c2ca5df87b5f74c615c45f8b5b6faf82cb158/chrome/browser/net/chrome_network_delegate.cc [modify] https://crrev.com/da6c2ca5df87b5f74c615c45f8b5b6faf82cb158/chrome/browser/net/chrome_network_delegate_unittest.cc [modify] https://crrev.com/da6c2ca5df87b5f74c615c45f8b5b6faf82cb158/components/data_use_measurement/content/data_use_measurement.cc [modify] https://crrev.com/da6c2ca5df87b5f74c615c45f8b5b6faf82cb158/components/data_use_measurement/content/data_use_measurement.h [modify] https://crrev.com/da6c2ca5df87b5f74c615c45f8b5b6faf82cb158/components/data_use_measurement/content/data_use_measurement_unittest.cc [modify] https://crrev.com/da6c2ca5df87b5f74c615c45f8b5b6faf82cb158/components/data_use_measurement/core/data_use_user_data.cc [modify] https://crrev.com/da6c2ca5df87b5f74c615c45f8b5b6faf82cb158/components/data_use_measurement/core/data_use_user_data.h
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/b07005bcaac418bfed5e0e3a93edb025c8e43dfa commit b07005bcaac418bfed5e0e3a93edb025c8e43dfa Author: rajendrant <rajendrant@chromium.org> Date: Fri Oct 07 00:29:45 2016 Split the data use into foreground, background and unknown Currently data use is measured as foreground and background. In some cases where the app was transitioning from one state to different state, data use at that time should be logged as unknown. This CL changes the UMA to log on every network TX/RX of the URLRequest. Earlier it was logged only when URLRequest completes. BUG= 648808 Review-Url: https://codereview.chromium.org/2399783003 Cr-Commit-Position: refs/heads/master@{#423761} [modify] https://crrev.com/b07005bcaac418bfed5e0e3a93edb025c8e43dfa/chrome/browser/net/chrome_network_delegate_unittest.cc [modify] https://crrev.com/b07005bcaac418bfed5e0e3a93edb025c8e43dfa/components/data_use_measurement/content/data_use_measurement.cc [modify] https://crrev.com/b07005bcaac418bfed5e0e3a93edb025c8e43dfa/components/data_use_measurement/content/data_use_measurement.h [modify] https://crrev.com/b07005bcaac418bfed5e0e3a93edb025c8e43dfa/components/data_use_measurement/content/data_use_measurement_unittest.cc [modify] https://crrev.com/b07005bcaac418bfed5e0e3a93edb025c8e43dfa/components/data_use_measurement/core/data_use_user_data.h
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/8766555a6c807796f6c177a3fe4ed81598620324 commit 8766555a6c807796f6c177a3fe4ed81598620324 Author: rajendrant <rajendrant@chromium.org> Date: Thu Oct 20 03:31:05 2016 Record the time since Chromium is in background for background data use DataUse.BackgroundToDataRecievedPerByte.[User|System] histogram is recorded for each background downstream byte. DataUse.BackgroundToFirstDownstream.[User|System] histogram is recorded for the first background downstream byte. BUG= 648808 Review-Url: https://chromiumcodereview.appspot.com/2417773005 Cr-Commit-Position: refs/heads/master@{#426386} [modify] https://crrev.com/8766555a6c807796f6c177a3fe4ed81598620324/components/data_use_measurement/content/data_use_measurement.cc [modify] https://crrev.com/8766555a6c807796f6c177a3fe4ed81598620324/components/data_use_measurement/content/data_use_measurement.h [modify] https://crrev.com/8766555a6c807796f6c177a3fe4ed81598620324/components/data_use_measurement/content/data_use_measurement_unittest.cc [modify] https://crrev.com/8766555a6c807796f6c177a3fe4ed81598620324/tools/metrics/histograms/histograms.xml
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/4a5e8956c85b5ac72858d08cd472babc89e9c9b9 commit 4a5e8956c85b5ac72858d08cd472babc89e9c9b9 Author: rajendrant <rajendrant@chromium.org> Date: Fri Oct 28 07:56:54 2016 Add unknown dimension for data use histograms Following CL changed data use histograms to be logged as foreground, background and unknown. This CL adds the dimensions to histograms.xml. https://crrev.com/b07005bcaac418bfed5e0e3a93edb025c8e43dfa BUG= 648808 Review-Url: https://codereview.chromium.org/2445193008 Cr-Commit-Position: refs/heads/master@{#428314} [modify] https://crrev.com/4a5e8956c85b5ac72858d08cd472babc89e9c9b9/tools/metrics/histograms/histograms.xml
Is this fixed?
Your change meets the bar and is auto-approved for M55 (branch: 2883)
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/d0da84daf2f9b33da3849d2073875f989e183901 commit d0da84daf2f9b33da3849d2073875f989e183901 Author: rajendrant <rajendrant@chromium.org> Date: Mon Oct 31 01:50:52 2016 Record the time since Chromium is in background for background data use DataUse.BackgroundToDataRecievedPerByte.[User|System] histogram is recorded for each background downstream byte. DataUse.BackgroundToFirstDownstream.[User|System] histogram is recorded for the first background downstream byte. BUG= 648808 Review-Url: https://chromiumcodereview.appspot.com/2417773005 Cr-Commit-Position: refs/heads/master@{#426386} (cherry picked from commit 8766555a6c807796f6c177a3fe4ed81598620324) Review URL: https://codereview.chromium.org/2462923002 . Cr-Commit-Position: refs/branch-heads/2883@{#380} Cr-Branched-From: 614d31daee2f61b0180df403a8ad43f20b9f6dd7-refs/heads/master@{#423768} [modify] https://crrev.com/d0da84daf2f9b33da3849d2073875f989e183901/components/data_use_measurement/content/data_use_measurement.cc [modify] https://crrev.com/d0da84daf2f9b33da3849d2073875f989e183901/components/data_use_measurement/content/data_use_measurement.h [modify] https://crrev.com/d0da84daf2f9b33da3849d2073875f989e183901/components/data_use_measurement/content/data_use_measurement_unittest.cc [modify] https://crrev.com/d0da84daf2f9b33da3849d2073875f989e183901/tools/metrics/histograms/histograms.xml
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/17c2ae517b4d62a3a409d43fe4f2d1c868004172 commit 17c2ae517b4d62a3a409d43fe4f2d1c868004172 Author: rajendrant <rajendrant@chromium.org> Date: Mon Oct 31 03:18:34 2016 Add unknown dimension for data use histograms Following CL changed data use histograms to be logged as foreground, background and unknown. This CL adds the dimensions to histograms.xml. https://crrev.com/b07005bcaac418bfed5e0e3a93edb025c8e43dfa BUG= 648808 Review-Url: https://codereview.chromium.org/2445193008 Cr-Commit-Position: refs/heads/master@{#428314} (cherry picked from commit 4a5e8956c85b5ac72858d08cd472babc89e9c9b9) Review URL: https://codereview.chromium.org/2460273002 . Cr-Commit-Position: refs/branch-heads/2883@{#381} Cr-Branched-From: 614d31daee2f61b0180df403a8ad43f20b9f6dd7-refs/heads/master@{#423768} [modify] https://crrev.com/17c2ae517b4d62a3a409d43fe4f2d1c868004172/tools/metrics/histograms/histograms.xml
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/14a5a85e424b65bcf740e9b4031d0af42f95b1b8 commit 14a5a85e424b65bcf740e9b4031d0af42f95b1b8 Author: rajendrant <rajendrant@chromium.org> Date: Thu Nov 17 17:58:48 2016 Move data use measurement to DataUseNetworkDelegate Currently data_use_measurement hooks to ChromeNetworkDelegate. It is more appropriate to hook to DataUseNetworkDelegate, since getting web content observer events other UI events will be easier (in future CLs) from DataUseAscriber. BUG= 648808 Review-Url: https://codereview.chromium.org/2462983003 Cr-Commit-Position: refs/heads/master@{#432910} [modify] https://crrev.com/14a5a85e424b65bcf740e9b4031d0af42f95b1b8/chrome/browser/BUILD.gn [modify] https://crrev.com/14a5a85e424b65bcf740e9b4031d0af42f95b1b8/chrome/browser/data_use_measurement/chrome_data_use_ascriber.cc [modify] https://crrev.com/14a5a85e424b65bcf740e9b4031d0af42f95b1b8/chrome/browser/data_use_measurement/chrome_data_use_ascriber.h [modify] https://crrev.com/14a5a85e424b65bcf740e9b4031d0af42f95b1b8/chrome/browser/extensions/api/web_request/web_request_api_unittest.cc [modify] https://crrev.com/14a5a85e424b65bcf740e9b4031d0af42f95b1b8/chrome/browser/io_thread.cc [modify] https://crrev.com/14a5a85e424b65bcf740e9b4031d0af42f95b1b8/chrome/browser/io_thread.h [modify] https://crrev.com/14a5a85e424b65bcf740e9b4031d0af42f95b1b8/chrome/browser/net/chrome_network_delegate.cc [modify] https://crrev.com/14a5a85e424b65bcf740e9b4031d0af42f95b1b8/chrome/browser/net/chrome_network_delegate.h [modify] https://crrev.com/14a5a85e424b65bcf740e9b4031d0af42f95b1b8/chrome/browser/net/chrome_network_delegate_unittest.cc [modify] https://crrev.com/14a5a85e424b65bcf740e9b4031d0af42f95b1b8/chrome/browser/precache/precache_util.cc [modify] https://crrev.com/14a5a85e424b65bcf740e9b4031d0af42f95b1b8/chrome/browser/profiles/profile_impl_io_data.cc [modify] https://crrev.com/14a5a85e424b65bcf740e9b4031d0af42f95b1b8/chrome/browser/profiles/profile_io_data.cc [modify] https://crrev.com/14a5a85e424b65bcf740e9b4031d0af42f95b1b8/components/BUILD.gn [modify] https://crrev.com/14a5a85e424b65bcf740e9b4031d0af42f95b1b8/components/data_use_measurement/content/BUILD.gn [modify] https://crrev.com/14a5a85e424b65bcf740e9b4031d0af42f95b1b8/components/data_use_measurement/content/DEPS [add] https://crrev.com/14a5a85e424b65bcf740e9b4031d0af42f95b1b8/components/data_use_measurement/content/content_url_request_classifier.cc [add] https://crrev.com/14a5a85e424b65bcf740e9b4031d0af42f95b1b8/components/data_use_measurement/content/content_url_request_classifier.h [modify] https://crrev.com/14a5a85e424b65bcf740e9b4031d0af42f95b1b8/components/data_use_measurement/core/BUILD.gn [modify] https://crrev.com/14a5a85e424b65bcf740e9b4031d0af42f95b1b8/components/data_use_measurement/core/DEPS [modify] https://crrev.com/14a5a85e424b65bcf740e9b4031d0af42f95b1b8/components/data_use_measurement/core/data_use_ascriber.cc [modify] https://crrev.com/14a5a85e424b65bcf740e9b4031d0af42f95b1b8/components/data_use_measurement/core/data_use_ascriber.h [rename] https://crrev.com/14a5a85e424b65bcf740e9b4031d0af42f95b1b8/components/data_use_measurement/core/data_use_measurement.cc [rename] https://crrev.com/14a5a85e424b65bcf740e9b4031d0af42f95b1b8/components/data_use_measurement/core/data_use_measurement.h [rename] https://crrev.com/14a5a85e424b65bcf740e9b4031d0af42f95b1b8/components/data_use_measurement/core/data_use_measurement_unittest.cc [modify] https://crrev.com/14a5a85e424b65bcf740e9b4031d0af42f95b1b8/components/data_use_measurement/core/data_use_network_delegate.cc [modify] https://crrev.com/14a5a85e424b65bcf740e9b4031d0af42f95b1b8/components/data_use_measurement/core/data_use_network_delegate.h [add] https://crrev.com/14a5a85e424b65bcf740e9b4031d0af42f95b1b8/components/data_use_measurement/core/data_use_network_delegate_unittest.cc [add] https://crrev.com/14a5a85e424b65bcf740e9b4031d0af42f95b1b8/components/data_use_measurement/core/url_request_classifier.h
Comment 1 by bugdroid1@chromium.org
, Sep 27 2016