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

Issue 1818613002: Implement UMA log throttling for cellular connections (Closed)

Created:
4 years, 9 months ago by gayane -on leave until 09-2017
Modified:
4 years, 8 months ago
CC:
chromium-reviews, droger+watchlist_chromium.org, blundell+watchlist_chromium.org, sdefresne+watchlist_chromium.org, jam, darin-cc_chromium.org, asvitkine+watch_chromium.org, bengr
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Implement UMA log throttling for cellular connections. For enabling UMA on cellular, a throttling logic is implemented that takes into account the weekly data usage of UMA on cellular as well as the ratio of UMA data usage over overall Chrome data traffic. For tracking UMA data use and overall Chrome data traffic we use DataUseMeasurement class which already collects and reports similar data. The allowed weekly UMA quota and UMA ratio are passed through as variation param. BUG=599586 Committed: https://crrev.com/0b46091cb37b8fdd73a02675e2ab86850d51cb09 Cr-Commit-Position: refs/heads/master@{#385845}

Patch Set 1 #

Total comments: 18

Patch Set 2 : singleton pattern removed #

Total comments: 28

Patch Set 3 : improved design #

Patch Set 4 : sync #

Patch Set 5 : fix build for gn, fix unittests, add comments #

Total comments: 18

Patch Set 6 : Get callback through metrics service #

Patch Set 7 : fix param order #

Total comments: 42

Patch Set 8 : #

Total comments: 26

Patch Set 9 : #

Patch Set 10 : #

Total comments: 14

Patch Set 11 : #

Total comments: 15

Patch Set 12 : sync #

Patch Set 13 : #

Total comments: 4

Patch Set 14 : nits #

Total comments: 12

Patch Set 15 : #

Total comments: 18

Patch Set 16 : #

Total comments: 10

Patch Set 17 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+711 lines, -65 lines) Patch
M chrome/browser/extensions/api/web_request/web_request_api_unittest.cc View 1 2 3 4 2 chunks +4 lines, -2 lines 0 comments Download
M chrome/browser/io_thread.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +7 lines, -0 lines 0 comments Download
M chrome/browser/io_thread.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 4 chunks +16 lines, -1 line 0 comments Download
M chrome/browser/metrics/chrome_metrics_service_client.h View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/metrics/chrome_metrics_service_client.cc View 1 2 3 4 5 6 7 8 9 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/net/chrome_network_delegate.h View 1 2 3 4 5 2 chunks +5 lines, -2 lines 0 comments Download
M chrome/browser/net/chrome_network_delegate.cc View 1 2 3 4 5 2 chunks +5 lines, -3 lines 0 comments Download
M chrome/browser/net/chrome_network_delegate_unittest.cc View 1 2 3 4 3 chunks +6 lines, -3 lines 0 comments Download
M chrome/browser/profiles/profile_io_data.cc View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +5 lines, -5 lines 0 comments Download
M components/components_tests.gyp View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -0 lines 0 comments Download
M components/data_use_measurement/content/BUILD.gn View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M components/data_use_measurement/content/DEPS View 1 chunk +1 line, -0 lines 0 comments Download
M components/data_use_measurement/content/data_use_measurement.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 4 chunks +14 lines, -2 lines 0 comments Download
M components/data_use_measurement/content/data_use_measurement.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 4 chunks +33 lines, -17 lines 0 comments Download
M components/data_use_measurement/content/data_use_measurement_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 6 chunks +41 lines, -28 lines 0 comments Download
M components/metrics.gypi View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M components/metrics/BUILD.gn View 1 2 3 2 chunks +3 lines, -0 lines 0 comments Download
A components/metrics/data_use_tracker.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +99 lines, -0 lines 0 comments Download
A components/metrics/data_use_tracker.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +205 lines, -0 lines 0 comments Download
A components/metrics/data_use_tracker_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +206 lines, -0 lines 0 comments Download
M components/metrics/metrics_pref_names.h View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
M components/metrics/metrics_pref_names.cc View 1 2 1 chunk +8 lines, -0 lines 0 comments Download
M components/metrics/metrics_service.h View 1 2 3 4 5 6 7 8 9 4 chunks +9 lines, -1 line 0 comments Download
M components/metrics/metrics_service.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 5 chunks +23 lines, -1 line 0 comments Download
M components/metrics/metrics_service_client.h View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -0 lines 0 comments Download
M components/metrics/metrics_service_client.cc View 1 2 3 4 5 6 7 8 1 chunk +4 lines, -0 lines 0 comments Download

Messages

Total messages: 79 (29 generated)
gayane -on leave until 09-2017
Could you please have a look on high level design.
4 years, 9 months ago (2016-03-18 21:59:32 UTC) #3
Alexei Svitkine (slow)
https://codereview.chromium.org/1818613002/diff/20001/chrome/browser/browser_process_impl.cc File chrome/browser/browser_process_impl.cc (right): https://codereview.chromium.org/1818613002/diff/20001/chrome/browser/browser_process_impl.cc#newcode850 chrome/browser/browser_process_impl.cc:850: registry->RegisterDictionaryPref(metrics::prefs::kUmaCellDataUse); Suggest adding a MetricsDataUseMeasurements::RegisterPrefs function and doing this ...
4 years, 9 months ago (2016-03-18 22:23:30 UTC) #4
gayane -on leave until 09-2017
This still needs a lot of polish, but its in a working state of the ...
4 years, 8 months ago (2016-03-29 16:06:20 UTC) #6
Alexei Svitkine (slow)
https://codereview.chromium.org/1818613002/diff/60001/chrome/browser/profiles/profile_io_data.cc File chrome/browser/profiles/profile_io_data.cc (right): https://codereview.chromium.org/1818613002/diff/60001/chrome/browser/profiles/profile_io_data.cc#newcode550 chrome/browser/profiles/profile_io_data.cc:550: data_use_tracker_ = g_browser_process->metrics_service()->GetDataUseTracker(); I was suggesting to actually store ...
4 years, 8 months ago (2016-03-29 16:29:11 UTC) #7
gayane -on leave until 09-2017
Seems like all the bits are passing now. Could you have one more look now. ...
4 years, 8 months ago (2016-03-31 01:38:25 UTC) #14
Alexei Svitkine (slow)
+bengr FYI/heads up For enabling UMA on cellular we'll be adding throttling logic to UMA ...
4 years, 8 months ago (2016-03-31 04:19:26 UTC) #15
Alexei Svitkine (slow)
https://codereview.chromium.org/1818613002/diff/240001/chrome/browser/io_thread.cc File chrome/browser/io_thread.cc (right): https://codereview.chromium.org/1818613002/diff/240001/chrome/browser/io_thread.cc#newcode518 chrome/browser/io_thread.cc:518: g_browser_process->metrics_service()->GetDataUseTracker(), Instead of having a static GetForwardingCallback() on the ...
4 years, 8 months ago (2016-03-31 04:32:25 UTC) #16
gayane -on leave until 09-2017
Getting callback through metrics service, but metrics service still calls data_use_tracker to get the callback. ...
4 years, 8 months ago (2016-03-31 17:54:58 UTC) #17
Alexei Svitkine (slow)
Yep - that's what I meant. :) Can you file a crbug to track the ...
4 years, 8 months ago (2016-03-31 18:23:20 UTC) #18
Alexei Svitkine (slow)
https://codereview.chromium.org/1818613002/diff/300001/components/metrics/data_use_tracker.cc File components/metrics/data_use_tracker.cc (right): https://codereview.chromium.org/1818613002/diff/300001/components/metrics/data_use_tracker.cc#newcode18 components/metrics/data_use_tracker.cc:18: void UpdateMetricsUsagePrefs( Add a 1-line comment. Also, put empty ...
4 years, 8 months ago (2016-03-31 20:00:40 UTC) #22
Alexei Svitkine (slow)
https://codereview.chromium.org/1818613002/diff/300001/components/components_tests.gyp File components/components_tests.gyp (left): https://codereview.chromium.org/1818613002/diff/300001/components/components_tests.gyp#oldcode246 components/components_tests.gyp:246: ], What happened here? https://codereview.chromium.org/1818613002/diff/300001/components/data_use_measurement/content/data_use_measurement.h File components/data_use_measurement/content/data_use_measurement.h (right): https://codereview.chromium.org/1818613002/diff/300001/components/data_use_measurement/content/data_use_measurement.h#newcode37 ...
4 years, 8 months ago (2016-03-31 20:59:31 UTC) #23
gayane -on leave until 09-2017
Thanks Alexei for all the comments. please have one more look https://codereview.chromium.org/1818613002/diff/300001/components/components_tests.gyp File components/components_tests.gyp (left): ...
4 years, 8 months ago (2016-03-31 21:55:10 UTC) #24
Alexei Svitkine (slow)
https://codereview.chromium.org/1818613002/diff/300001/components/metrics/data_use_tracker.cc File components/metrics/data_use_tracker.cc (right): https://codereview.chromium.org/1818613002/diff/300001/components/metrics/data_use_tracker.cc#newcode113 components/metrics/data_use_tracker.cc:113: if (key_date > week_ago) On 2016/03/31 21:55:09, gayane wrote: ...
4 years, 8 months ago (2016-03-31 22:18:03 UTC) #25
gayane -on leave until 09-2017
I have addressed all the comments and also removed IsCellularLogicEnabled function from MetricsService construtor https://codereview.chromium.org/1818613002/diff/320001/components/metrics/data_use_tracker.cc ...
4 years, 8 months ago (2016-04-01 19:49:31 UTC) #28
Alexei Svitkine (slow)
Can you also proofread the CL description? For example, the second sentence is a bit ...
4 years, 8 months ago (2016-04-01 19:57:10 UTC) #29
gayane -on leave until 09-2017
Unfortunately I realized I forgot to change metrics service to use the client and uploaded ...
4 years, 8 months ago (2016-04-01 20:31:13 UTC) #32
Alexei Svitkine (slow)
On Fri, Apr 1, 2016 at 4:31 PM, <gayane@chromium.org> wrote: > Unfortunately I realized I ...
4 years, 8 months ago (2016-04-01 20:33:14 UTC) #34
gayane -on leave until 09-2017
https://codereview.chromium.org/1818613002/diff/420001/components/data_use_measurement/content/data_use_measurement.h File components/data_use_measurement/content/data_use_measurement.h (right): https://codereview.chromium.org/1818613002/diff/420001/components/data_use_measurement/content/data_use_measurement.h#newcode17 components/data_use_measurement/content/data_use_measurement.h:17: #include "components/metrics/data_use_tracker.h" The only reason we have this dependency ...
4 years, 8 months ago (2016-04-01 20:34:44 UTC) #35
Alexei Svitkine (slow)
Thanks, looks good now. Adding Ben for owners review of components/data_use_measurement. https://codereview.chromium.org/1818613002/diff/420001/components/components_tests.gyp File components/components_tests.gyp (left): ...
4 years, 8 months ago (2016-04-01 20:38:58 UTC) #37
Alexei Svitkine (slow)
https://codereview.chromium.org/1818613002/diff/420001/components/data_use_measurement/content/data_use_measurement.h File components/data_use_measurement/content/data_use_measurement.h (right): https://codereview.chromium.org/1818613002/diff/420001/components/data_use_measurement/content/data_use_measurement.h#newcode17 components/data_use_measurement/content/data_use_measurement.h:17: #include "components/metrics/data_use_tracker.h" On 2016/04/01 20:34:44, gayane wrote: > The ...
4 years, 8 months ago (2016-04-01 20:40:32 UTC) #38
Alexei Svitkine (slow)
Also looping in +mmenke for the changes in: chrome/browser/io_thread.* chrome/browser/net/* chrome/browser/profiles/*
4 years, 8 months ago (2016-04-01 20:44:57 UTC) #40
mmenke
https://codereview.chromium.org/1818613002/diff/420001/components/data_use_measurement/content/data_use_measurement.cc File components/data_use_measurement/content/data_use_measurement.cc (right): https://codereview.chromium.org/1818613002/diff/420001/components/data_use_measurement/content/data_use_measurement.cc#newcode110 components/data_use_measurement/content/data_use_measurement.cc:110: total_upload_bytes + total_received_bytes); This seems like way too many ...
4 years, 8 months ago (2016-04-01 20:59:35 UTC) #42
gayane -on leave until 09-2017
Done. https://codereview.chromium.org/1818613002/diff/420001/components/components_tests.gyp File components/components_tests.gyp (left): https://codereview.chromium.org/1818613002/diff/420001/components/components_tests.gyp#oldcode246 components/components_tests.gyp:246: ], On 2016/04/01 20:38:58, Alexei Svitkine wrote: > ...
4 years, 8 months ago (2016-04-01 21:00:08 UTC) #44
Alexei Svitkine (slow)
https://codereview.chromium.org/1818613002/diff/420001/components/data_use_measurement/content/data_use_measurement.cc File components/data_use_measurement/content/data_use_measurement.cc (right): https://codereview.chromium.org/1818613002/diff/420001/components/data_use_measurement/content/data_use_measurement.cc#newcode110 components/data_use_measurement/content/data_use_measurement.cc:110: total_upload_bytes + total_received_bytes); On 2016/04/01 20:59:35, mmenke wrote: > ...
4 years, 8 months ago (2016-04-01 21:07:30 UTC) #45
Alexei Svitkine (slow)
https://codereview.chromium.org/1818613002/diff/420001/components/data_use_measurement/content/data_use_measurement.cc File components/data_use_measurement/content/data_use_measurement.cc (right): https://codereview.chromium.org/1818613002/diff/420001/components/data_use_measurement/content/data_use_measurement.cc#newcode110 components/data_use_measurement/content/data_use_measurement.cc:110: total_upload_bytes + total_received_bytes); On 2016/04/01 21:07:30, Alexei Svitkine wrote: ...
4 years, 8 months ago (2016-04-04 16:01:00 UTC) #47
mmenke
https://codereview.chromium.org/1818613002/diff/420001/components/data_use_measurement/content/data_use_measurement.cc File components/data_use_measurement/content/data_use_measurement.cc (right): https://codereview.chromium.org/1818613002/diff/420001/components/data_use_measurement/content/data_use_measurement.cc#newcode110 components/data_use_measurement/content/data_use_measurement.cc:110: total_upload_bytes + total_received_bytes); On 2016/04/04 16:01:00, Alexei Svitkine wrote: ...
4 years, 8 months ago (2016-04-04 17:26:24 UTC) #48
gayane -on leave until 09-2017
For decreasing posting task from IO to UI we can implement a mechanism to buffer ...
4 years, 8 months ago (2016-04-05 14:26:46 UTC) #49
Alexei Svitkine (slow)
https://codereview.chromium.org/1818613002/diff/500001/chrome/browser/io_thread.h File chrome/browser/io_thread.h (right): https://codereview.chromium.org/1818613002/diff/500001/chrome/browser/io_thread.h#newcode294 chrome/browser/io_thread.h:294: const metrics::UpdateUsagePrefCallbackType GetMetricsDataUseForwarder(); Nit: Return by const ref. https://codereview.chromium.org/1818613002/diff/500001/components/data_use_measurement/content/data_use_measurement.h ...
4 years, 8 months ago (2016-04-05 15:58:57 UTC) #50
gayane -on leave until 09-2017
Addressed comments by @asvitkine https://codereview.chromium.org/1818613002/diff/500001/chrome/browser/io_thread.h File chrome/browser/io_thread.h (right): https://codereview.chromium.org/1818613002/diff/500001/chrome/browser/io_thread.h#newcode294 chrome/browser/io_thread.h:294: const metrics::UpdateUsagePrefCallbackType GetMetricsDataUseForwarder(); On 2016/04/05 ...
4 years, 8 months ago (2016-04-05 17:24:45 UTC) #51
gayane -on leave until 09-2017
Addressed comments by @asvitkine
4 years, 8 months ago (2016-04-05 17:24:49 UTC) #52
mmenke
On 2016/04/05 14:26:46, gayane wrote: > For decreasing posting task from IO to UI we ...
4 years, 8 months ago (2016-04-05 20:09:15 UTC) #53
mmenke
io_thread.h, profiles/, chrome/browser/net LGTM (Despite the comments elsewhere, did not do a full review of ...
4 years, 8 months ago (2016-04-05 20:18:33 UTC) #54
gayane -on leave until 09-2017
> On 2016/04/05 14:26:46, gayane wrote: > > For decreasing posting task from IO to ...
4 years, 8 months ago (2016-04-06 18:30:56 UTC) #55
gayane -on leave until 09-2017
bengr@ ping
4 years, 8 months ago (2016-04-06 18:31:43 UTC) #57
Alexei Svitkine (slow)
https://codereview.chromium.org/1818613002/diff/540001/components/metrics/metrics_service.cc File components/metrics/metrics_service.cc (right): https://codereview.chromium.org/1818613002/diff/540001/components/metrics/metrics_service.cc#newcode310 components/metrics/metrics_service.cc:310: data_use_tracker_.reset(new DataUseTracker(local_state_)); We only want to do this logic ...
4 years, 8 months ago (2016-04-06 18:37:43 UTC) #58
gayane -on leave until 09-2017
asargent@chromium.org: Please review changes in chrome/browser/extensions/api/web_request/web_request_api_unittest.cc blundell@chromium.org: Please review changes in components/metrics.gypi
4 years, 8 months ago (2016-04-06 18:40:35 UTC) #60
asargent_no_longer_on_chrome
web_request_api_unittest.cc lgtm
4 years, 8 months ago (2016-04-06 20:13:37 UTC) #61
bengr
https://codereview.chromium.org/1818613002/diff/540001/components/data_use_measurement/content/data_use_measurement.cc File components/data_use_measurement/content/data_use_measurement.cc (right): https://codereview.chromium.org/1818613002/diff/540001/components/data_use_measurement/content/data_use_measurement.cc#newcode81 components/data_use_measurement/content/data_use_measurement.cc:81: bool is_conn_cellular = net::NetworkChangeNotifier::IsConnectionCellular( conn -> connection. is_cellular and ...
4 years, 8 months ago (2016-04-06 20:57:11 UTC) #62
blundell
What am I being asked to review on this CL? Sorry if I missed it.
4 years, 8 months ago (2016-04-07 07:29:33 UTC) #63
gayane -on leave until 09-2017
On 2016/04/07 07:29:33, blundell wrote: > What am I being asked to review on this ...
4 years, 8 months ago (2016-04-07 15:10:41 UTC) #64
gayane -on leave until 09-2017
asvitkine@ and bengr@ comments addressed https://codereview.chromium.org/1818613002/diff/540001/components/data_use_measurement/content/data_use_measurement.cc File components/data_use_measurement/content/data_use_measurement.cc (right): https://codereview.chromium.org/1818613002/diff/540001/components/data_use_measurement/content/data_use_measurement.cc#newcode81 components/data_use_measurement/content/data_use_measurement.cc:81: bool is_conn_cellular = net::NetworkChangeNotifier::IsConnectionCellular( ...
4 years, 8 months ago (2016-04-07 15:30:39 UTC) #65
blundell
On 2016/04/07 15:10:41, gayane wrote: > On 2016/04/07 07:29:33, blundell wrote: > > What am ...
4 years, 8 months ago (2016-04-07 15:31:36 UTC) #66
Alexei Svitkine (slow)
lgtm % comments https://codereview.chromium.org/1818613002/diff/540001/components/data_use_measurement/content/data_use_measurement.h File components/data_use_measurement/content/data_use_measurement.h (right): https://codereview.chromium.org/1818613002/diff/540001/components/data_use_measurement/content/data_use_measurement.h#newcode71 components/data_use_measurement/content/data_use_measurement.h:71: bool is_conn_cellular) const; On 2016/04/07 15:30:39, ...
4 years, 8 months ago (2016-04-07 15:43:29 UTC) #67
bengr
lgtm
4 years, 8 months ago (2016-04-07 17:57:55 UTC) #69
gayane -on leave until 09-2017
asvitkine@ comments addressed. asvitkine@ blundell@ according to my review tool components/metrics.gypi is not covered. https://codereview.chromium.org/1818613002/diff/540001/components/data_use_measurement/content/data_use_measurement.h ...
4 years, 8 months ago (2016-04-07 18:53:49 UTC) #70
Alexei Svitkine (slow)
lgtm
4 years, 8 months ago (2016-04-07 18:57:31 UTC) #71
Alexei Svitkine (slow)
"asvitkine@ blundell@ according to my review tool components/metrics.gypi is not covered." I think the extension ...
4 years, 8 months ago (2016-04-07 19:03:11 UTC) #74
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1818613002/600001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1818613002/600001
4 years, 8 months ago (2016-04-07 19:03:17 UTC) #75
commit-bot: I haz the power
Committed patchset #17 (id:600001)
4 years, 8 months ago (2016-04-07 21:01:19 UTC) #77
commit-bot: I haz the power
4 years, 8 months ago (2016-04-07 21:03:17 UTC) #79
Message was sent while issue was closed.
Patchset 17 (id:??) landed as
https://crrev.com/0b46091cb37b8fdd73a02675e2ab86850d51cb09
Cr-Commit-Position: refs/heads/master@{#385845}

Powered by Google App Engine
This is Rietveld 408576698