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

Issue 5180003: cashew: add local byte counters (Closed)

Created:
10 years, 1 month ago by Vince Laviano
Modified:
9 years ago
Reviewers:
Jason Glasgow
CC:
chromium-os-reviews_chromium.org, Vince Laviano
Visibility:
Public.

Description

cashew: add local byte counters The data provided by the carrier usage API isn't always updated in real time after a cellular device has connected to the network, and carriers would prefer if we didn't make frequent API requests. So, instead of making periodic API requests and relying on the returned data to be fresh, we hit the API once on connect to set a baseline and then track usage relative to this baseline by looking at local network interface counters maintained by the system. This change should be transparent to our clients, who trust us to provide the best info possible regardless of its source. BUG=chromium-os:7770 TEST=unit tests, manual testing on device Change-Id: Ib88dee5ee52d0e781f853356a3d68da714627bc8 Committed: http://chrome-svn/viewvc/chromeos?view=rev&revision=9de77a5

Patch Set 1 #

Total comments: 6

Patch Set 2 : Address jglasgow and zelidrag (offline) code review comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+875 lines, -86 lines) Patch
M src/Makefile.am View 5 chunks +8 lines, -3 lines 0 comments Download
A src/byte_counter.h View 1 chunk +52 lines, -0 lines 0 comments Download
A src/byte_counter.cc View 1 chunk +19 lines, -0 lines 0 comments Download
M src/data_plan.h View 6 chunks +23 lines, -0 lines 0 comments Download
M src/data_plan.cc View 4 chunks +42 lines, -6 lines 0 comments Download
M src/default_policy.h View 2 chunks +1 line, -5 lines 0 comments Download
M src/default_policy.cc View 2 chunks +2 lines, -7 lines 0 comments Download
M src/default_policy_unittest.cc View 2 chunks +4 lines, -10 lines 0 comments Download
M src/device.h View 6 chunks +53 lines, -4 lines 0 comments Download
M src/device.cc View 10 chunks +145 lines, -21 lines 0 comments Download
M src/policy.h View 1 chunk +1 line, -5 lines 0 comments Download
M src/policy.cc View 1 chunk +1 line, -0 lines 0 comments Download
A src/procfs_byte_counter.h View 1 1 chunk +90 lines, -0 lines 0 comments Download
A src/procfs_byte_counter.cc View 1 1 chunk +227 lines, -0 lines 0 comments Download
A src/procfs_byte_counter_unittest.cc View 1 chunk +28 lines, -0 lines 0 comments Download
M src/service.h View 1 4 chunks +28 lines, -1 line 0 comments Download
M src/service.cc View 1 16 chunks +151 lines, -24 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
Vince Laviano
First cut at local counters. Remaining work: - Do something more sensible with the update ...
10 years, 1 month ago (2010-11-18 22:14:35 UTC) #1
Jason Glasgow
Looking good. See comment below about flimflam CL which changes DBUS properties. I still need ...
10 years, 1 month ago (2010-11-19 02:22:32 UTC) #2
Vince Laviano
http://codereview.chromium.org/5180003/diff/1/src/device.cc File src/device.cc (right): http://codereview.chromium.org/5180003/diff/1/src/device.cc#newcode15 src/device.cc:15: static const char *kFlimflamDeviceName = "org.chromium.flimflam"; On 2010/11/19 02:22:32, ...
10 years, 1 month ago (2010-11-19 02:44:58 UTC) #3
Jason Glasgow
LGTM - with just one nit. http://codereview.chromium.org/5180003/diff/1/src/procfs_byte_counter.h File src/procfs_byte_counter.h (right): http://codereview.chromium.org/5180003/diff/1/src/procfs_byte_counter.h#newcode22 src/procfs_byte_counter.h:22: // an procfs-based ...
10 years, 1 month ago (2010-11-19 21:51:07 UTC) #4
Vince Laviano
10 years, 1 month ago (2010-11-20 00:32:00 UTC) #5
Includes modification to monitor flimflam ConnectivityState property instead of
Cellular.RestrictedPool property.

http://codereview.chromium.org/5180003/diff/1/src/procfs_byte_counter.h
File src/procfs_byte_counter.h (right):

http://codereview.chromium.org/5180003/diff/1/src/procfs_byte_counter.h#newco...
src/procfs_byte_counter.h:22: // an procfs-based implementation of the
ByteCounter interface
On 2010/11/19 21:51:08, Jason Glasgow wrote:
> a procfs

Done.

Powered by Google App Engine
This is Rietveld 408576698