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

Issue 1421983002: Include tab IDs when reporting data use accounting. (Closed)

Created:
5 years, 2 months ago by sclittle
Modified:
5 years, 1 month ago
CC:
cbentzel+watch_chromium.org, chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@data_use_scoped_vector
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Include tab IDs when reporting data use accounting. This adds an asynchronous hop to the UI thread and a hop back to the IO thread to the data use accounting reporting path in order to find and include the associated tab ID in the report. BUG=547228 Committed: https://crrev.com/a133de07109e54152949b811da287f6c0c0f34a5 Cr-Commit-Position: refs/heads/master@{#358963}

Patch Set 1 #

Total comments: 12

Patch Set 2 : Polished and added some tests #

Total comments: 4

Patch Set 3 : Moved tab ID determination logic into data_usage codebase. #

Total comments: 42

Patch Set 4 : Addressed bengr comments #

Patch Set 5 : Fixed broken test #

Patch Set 6 : Fixed external_data_use_observer test #

Unified diffs Side-by-side diffs Delta from patch set Stats (+915 lines, -127 lines) Patch
M chrome/browser/BUILD.gn View 1 2 3 4 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/android/data_usage/external_data_use_observer_unittest.cc View 1 2 3 4 5 2 chunks +3 lines, -1 line 0 comments Download
A + chrome/browser/data_usage/OWNERS View 1 2 1 chunk +1 line, -0 lines 0 comments Download
A chrome/browser/data_usage/tab_id_annotator.h View 1 2 3 1 chunk +47 lines, -0 lines 0 comments Download
A chrome/browser/data_usage/tab_id_annotator.cc View 1 2 3 1 chunk +94 lines, -0 lines 0 comments Download
A chrome/browser/data_usage/tab_id_annotator_unittest.cc View 1 2 3 1 chunk +171 lines, -0 lines 0 comments Download
A chrome/browser/data_usage/tab_id_provider.h View 1 2 3 1 chunk +65 lines, -0 lines 0 comments Download
A chrome/browser/data_usage/tab_id_provider.cc View 1 2 3 1 chunk +130 lines, -0 lines 0 comments Download
A chrome/browser/data_usage/tab_id_provider_unittest.cc View 1 2 3 1 chunk +141 lines, -0 lines 0 comments Download
M chrome/browser/io_thread.cc View 1 2 3 4 2 chunks +4 lines, -1 line 0 comments Download
M chrome/browser/net/chrome_network_delegate.h View 1 2 2 chunks +8 lines, -2 lines 0 comments Download
M chrome/browser/net/chrome_network_delegate.cc View 1 2 3 4 2 chunks +20 lines, -23 lines 0 comments Download
M chrome/browser/net/chrome_network_delegate_unittest.cc View 1 2 2 chunks +5 lines, -3 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 2 chunks +7 lines, -0 lines 0 comments Download
M chrome/chrome_tests_unit.gypi View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M components/data_usage.gypi View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M components/data_usage/core/BUILD.gn View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M components/data_usage/core/data_use.h View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M components/data_usage/core/data_use.cc View 1 2 2 chunks +21 lines, -4 lines 0 comments Download
M components/data_usage/core/data_use_aggregator.h View 1 2 3 4 chunks +12 lines, -3 lines 0 comments Download
M components/data_usage/core/data_use_aggregator.cc View 1 2 5 chunks +44 lines, -26 lines 0 comments Download
M components/data_usage/core/data_use_aggregator_unittest.cc View 1 2 12 chunks +62 lines, -25 lines 0 comments Download
A components/data_usage/core/data_use_annotator.h View 1 2 3 1 chunk +38 lines, -0 lines 0 comments Download
M net/base/layered_network_delegate.h View 1 2 2 chunks +4 lines, -4 lines 0 comments Download
M net/base/layered_network_delegate.cc View 1 2 1 chunk +5 lines, -6 lines 0 comments Download
M net/base/layered_network_delegate_unittest.cc View 1 2 3 4 3 chunks +6 lines, -7 lines 0 comments Download
M net/base/network_delegate.h View 1 2 3 chunks +4 lines, -6 lines 0 comments Download
M net/base/network_delegate.cc View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M net/base/network_delegate_impl.h View 1 2 2 chunks +2 lines, -3 lines 0 comments Download
M net/base/network_delegate_impl.cc View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M net/url_request/url_request_job.cc View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M net/url_request/url_request_test_util.h View 1 2 1 chunk +2 lines, -3 lines 0 comments Download
M net/url_request/url_request_test_util.cc View 1 2 1 chunk +4 lines, -4 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 47 (11 generated)
sclittle
PTAL for design sanity check. I still need to polish it and add tests, but ...
5 years, 2 months ago (2015-10-24 06:59:31 UTC) #2
tbansal1
looks good. https://codereview.chromium.org/1421983002/diff/1/chrome/browser/net/chrome_network_delegate_unittest.cc File chrome/browser/net/chrome_network_delegate_unittest.cc (right): https://codereview.chromium.org/1421983002/diff/1/chrome/browser/net/chrome_network_delegate_unittest.cc#newcode108 chrome/browser/net/chrome_network_delegate_unittest.cc:108: void ReportDataUse(int64_t tx_bytes, Why not keep the ...
5 years, 1 month ago (2015-10-26 22:24:30 UTC) #3
sclittle
https://codereview.chromium.org/1421983002/diff/1/chrome/browser/net/chrome_network_delegate_unittest.cc File chrome/browser/net/chrome_network_delegate_unittest.cc (right): https://codereview.chromium.org/1421983002/diff/1/chrome/browser/net/chrome_network_delegate_unittest.cc#newcode108 chrome/browser/net/chrome_network_delegate_unittest.cc:108: void ReportDataUse(int64_t tx_bytes, On 2015/10/26 22:24:29, tbansal1 wrote: > ...
5 years, 1 month ago (2015-10-26 23:56:02 UTC) #4
bengr
https://codereview.chromium.org/1421983002/diff/1/chrome/browser/net/chrome_network_delegate.cc File chrome/browser/net/chrome_network_delegate.cc (right): https://codereview.chromium.org/1421983002/diff/1/chrome/browser/net/chrome_network_delegate.cc#newcode291 chrome/browser/net/chrome_network_delegate.cc:291: // the original tab that initiated the prerender. Great! ...
5 years, 1 month ago (2015-10-27 00:01:47 UTC) #5
sclittle
https://codereview.chromium.org/1421983002/diff/1/chrome/browser/net/chrome_network_delegate.cc File chrome/browser/net/chrome_network_delegate.cc (right): https://codereview.chromium.org/1421983002/diff/1/chrome/browser/net/chrome_network_delegate.cc#newcode291 chrome/browser/net/chrome_network_delegate.cc:291: // the original tab that initiated the prerender. On ...
5 years, 1 month ago (2015-10-28 22:30:45 UTC) #6
sclittle
mmenke: chrome_network_delegate* bengr, tbansal: * Thanks in advance!
5 years, 1 month ago (2015-10-28 22:31:27 UTC) #8
mmenke
https://codereview.chromium.org/1421983002/diff/20001/chrome/browser/net/chrome_network_delegate.cc File chrome/browser/net/chrome_network_delegate.cc (right): https://codereview.chromium.org/1421983002/diff/20001/chrome/browser/net/chrome_network_delegate.cc#newcode790 chrome/browser/net/chrome_network_delegate.cc:790: report_data_use_with_tab_id_callback)); I don't think we want post two tasks ...
5 years, 1 month ago (2015-10-28 22:43:13 UTC) #9
sclittle
https://codereview.chromium.org/1421983002/diff/20001/chrome/browser/net/chrome_network_delegate.cc File chrome/browser/net/chrome_network_delegate.cc (right): https://codereview.chromium.org/1421983002/diff/20001/chrome/browser/net/chrome_network_delegate.cc#newcode790 chrome/browser/net/chrome_network_delegate.cc:790: report_data_use_with_tab_id_callback)); On 2015/10/28 22:43:12, mmenke wrote: > I don't ...
5 years, 1 month ago (2015-10-28 23:04:56 UTC) #10
mmenke
https://codereview.chromium.org/1421983002/diff/20001/chrome/browser/net/chrome_network_delegate.cc File chrome/browser/net/chrome_network_delegate.cc (right): https://codereview.chromium.org/1421983002/diff/20001/chrome/browser/net/chrome_network_delegate.cc#newcode790 chrome/browser/net/chrome_network_delegate.cc:790: report_data_use_with_tab_id_callback)); On 2015/10/28 23:04:56, sclittle wrote: > On 2015/10/28 ...
5 years, 1 month ago (2015-10-28 23:18:42 UTC) #11
bengr
https://codereview.chromium.org/1421983002/diff/20001/chrome/browser/net/chrome_network_delegate.cc File chrome/browser/net/chrome_network_delegate.cc (right): https://codereview.chromium.org/1421983002/diff/20001/chrome/browser/net/chrome_network_delegate.cc#newcode790 chrome/browser/net/chrome_network_delegate.cc:790: report_data_use_with_tab_id_callback)); On 2015/10/28 23:18:42, mmenke wrote: > On 2015/10/28 ...
5 years, 1 month ago (2015-10-30 15:56:07 UTC) #12
mmenke
On 2015/10/30 15:56:07, bengr wrote: > https://codereview.chromium.org/1421983002/diff/20001/chrome/browser/net/chrome_network_delegate.cc > File chrome/browser/net/chrome_network_delegate.cc (right): > > https://codereview.chromium.org/1421983002/diff/20001/chrome/browser/net/chrome_network_delegate.cc#newcode790 > ...
5 years, 1 month ago (2015-10-30 16:49:23 UTC) #13
mmenke
On 2015/10/30 16:49:23, mmenke wrote: > On 2015/10/30 15:56:07, bengr wrote: > > > https://codereview.chromium.org/1421983002/diff/20001/chrome/browser/net/chrome_network_delegate.cc ...
5 years, 1 month ago (2015-10-30 16:55:19 UTC) #14
mmenke
On 2015/10/30 16:55:19, mmenke wrote: > On 2015/10/30 16:49:23, mmenke wrote: > > On 2015/10/30 ...
5 years, 1 month ago (2015-11-02 18:41:56 UTC) #15
sclittle
PTAL, I've batched tab ID hops for the same URLRequest together, and moved the logic ...
5 years, 1 month ago (2015-11-04 19:55:21 UTC) #16
sclittle
+jochen for newly added chrome/browser/data_usage directory.
5 years, 1 month ago (2015-11-04 19:56:37 UTC) #18
bengr
This CL is pretty large, but quite clear. Thanks for the clean code. Here's a ...
5 years, 1 month ago (2015-11-05 00:00:38 UTC) #19
sclittle
https://codereview.chromium.org/1421983002/diff/40001/chrome/browser/data_usage/tab_id_annotator.cc File chrome/browser/data_usage/tab_id_annotator.cc (right): https://codereview.chromium.org/1421983002/diff/40001/chrome/browser/data_usage/tab_id_annotator.cc#newcode30 chrome/browser/data_usage/tab_id_annotator.cc:30: // Attempt to get the associated tab ID for ...
5 years, 1 month ago (2015-11-05 01:22:49 UTC) #20
bengr
components/data_usage/* LGTM
5 years, 1 month ago (2015-11-05 16:40:22 UTC) #21
mmenke
On 2015/11/05 16:40:22, bengr wrote: > components/data_usage/* LGTM I'll try to get to this today. ...
5 years, 1 month ago (2015-11-05 18:25:03 UTC) #22
sclittle
Friendly ping.
5 years, 1 month ago (2015-11-07 00:44:45 UTC) #23
jochen (gone - plz use gerrit)
that's a lot of code just to get the tab id. Is all this general ...
5 years, 1 month ago (2015-11-07 06:27:39 UTC) #25
sky
On 2015/11/07 06:27:39, jochen (slow - traveling) wrote: > that's a lot of code just ...
5 years, 1 month ago (2015-11-08 16:22:18 UTC) #26
Avi (use Gerrit)
On 2015/11/08 16:22:18, sky wrote: > Not necessarily all code calls into TabHelpers::AttachTabHelpers though. Every ...
5 years, 1 month ago (2015-11-08 17:40:41 UTC) #27
mmenke
On 2015/11/08 17:40:41, Avi wrote: > On 2015/11/08 16:22:18, sky wrote: > > Not necessarily ...
5 years, 1 month ago (2015-11-09 19:34:50 UTC) #28
sclittle
On 2015/11/07 06:27:39, jochen (slow - traveling) wrote: > that's a lot of code just ...
5 years, 1 month ago (2015-11-09 19:45:58 UTC) #29
sclittle
On 2015/11/09 19:34:50, mmenke wrote: > Sorry for extreme slowness on this one... Looking at ...
5 years, 1 month ago (2015-11-09 19:47:27 UTC) #30
mmenke
On 2015/11/09 19:47:27, sclittle wrote: > On 2015/11/09 19:34:50, mmenke wrote: > > Sorry for ...
5 years, 1 month ago (2015-11-09 19:58:05 UTC) #31
mmenke
On 2015/11/09 19:58:05, mmenke wrote: > On 2015/11/09 19:47:27, sclittle wrote: > > On 2015/11/09 ...
5 years, 1 month ago (2015-11-09 21:32:18 UTC) #32
jochen (gone - plz use gerrit)
lgtm
5 years, 1 month ago (2015-11-10 20:07:15 UTC) #33
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1421983002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1421983002/60001
5 years, 1 month ago (2015-11-10 20:44:45 UTC) #35
commit-bot: I haz the power
Try jobs failed on following builders: android_chromium_gn_compile_rel on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/android_chromium_gn_compile_rel/builds/155865) linux_chromium_compile_dbg_32_ng on tryserver.chromium.linux (JOB_FAILED, ...
5 years, 1 month ago (2015-11-10 20:57:52 UTC) #37
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1421983002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1421983002/80001
5 years, 1 month ago (2015-11-10 21:48:52 UTC) #40
commit-bot: I haz the power
Try jobs failed on following builders: android_chromium_gn_compile_rel on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/android_chromium_gn_compile_rel/builds/155903) android_compile_dbg on tryserver.chromium.linux (JOB_FAILED, ...
5 years, 1 month ago (2015-11-10 22:08:14 UTC) #42
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1421983002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1421983002/100001
5 years, 1 month ago (2015-11-10 22:17:24 UTC) #45
commit-bot: I haz the power
Committed patchset #6 (id:100001)
5 years, 1 month ago (2015-11-10 23:54:28 UTC) #46
commit-bot: I haz the power
5 years, 1 month ago (2015-11-10 23:55:45 UTC) #47
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/a133de07109e54152949b811da287f6c0c0f34a5
Cr-Commit-Position: refs/heads/master@{#358963}

Powered by Google App Engine
This is Rietveld 408576698