|
|
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
Total comments: 6
|
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
|
Total messages: 5 (0 generated)
|