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

Unified Diff: src/device_impl.cc

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/device_impl.h ('k') | src/device_mock.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/device_impl.cc
diff --git a/src/device_impl.cc b/src/device_impl.cc
index 247730816df272900ba72421811d76bd2b8c72a2..1f16ef6ce6eaa8410bdf170fdca07c1b2ccba436 100644
--- a/src/device_impl.cc
+++ b/src/device_impl.cc
@@ -144,6 +144,15 @@ bool DeviceImpl::ByteCounterRunning() const {
return byte_counter_running_;
}
+void DeviceImpl::ResetByteCounter(uint64 rx_bytes, uint64 tx_bytes) {
+ DLOG(INFO) << path_ << ": ResetByteCounter: rx_bytes = " << rx_bytes
+ << ", tx_bytes = " << tx_bytes;
+ DCHECK(byte_counter_running_);
+ DCHECK(byte_counter_ != NULL);
+ byte_counter_->SetRxBytes(rx_bytes);
+ byte_counter_->SetTxBytes(tx_bytes);
+}
+
// ByteCounterDelegate methods
void DeviceImpl::OnByteCounterUpdate(const ByteCounter *counter,
« no previous file with comments | « src/device_impl.h ('k') | src/device_mock.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698