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

Unified Diff: src/device.h

Issue 6250171: cashew: reset local counter on plan transition (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/cashew.git@master
Patch Set: ers review comments Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/data_plan_unittest.cc ('k') | src/device_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/device.h
diff --git a/src/device.h b/src/device.h
index 79552344a6f17159f89cff84b799291139cc52aa..bd249032877d0e51a0854544e4abec44c0938e94 100644
--- a/src/device.h
+++ b/src/device.h
@@ -53,17 +53,23 @@ class Device {
// start a new byte counter from 0
// there must not be an existing byte counter
- // |parent_| will receive periodic updates via Service::OnByteCounterUpdate
+ // parent service will receive periodic updates via OnByteCounterUpdate
// returns true on success and false on failure
virtual bool StartByteCounter() = 0;
// destroy any existing byte counter
- // |parent_| will no longer receive updates after this call
+ // parent service will no longer receive updates after this call
virtual void StopByteCounter() = 0;
// is the byte counter running?
virtual bool ByteCounterRunning() const = 0;
+ // reset byte counter to an arbitrary baseline value
+ // counter will continue to run and increment relative to new baseline
+ // there must be an existing byte counter
+ // parent service must already have received at least one update
+ virtual void ResetByteCounter(uint64 rx_bytes, uint64 tx_bytes) = 0;
+
// factory
static Device* NewDevice(Service * const parent,
DBus::Connection& connection, // NOLINT
« no previous file with comments | « src/data_plan_unittest.cc ('k') | src/device_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698