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

Side by Side 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: 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010, 2011 The Chromium OS Authors. All rights reserved. 1 // Copyright (c) 2010, 2011 The Chromium OS Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef SRC_DEVICE_H_ 5 #ifndef SRC_DEVICE_H_
6 #define SRC_DEVICE_H_ 6 #define SRC_DEVICE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include <base/basictypes.h> // NOLINT 10 #include <base/basictypes.h> // NOLINT
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 // returns true on success and false on failure 57 // returns true on success and false on failure
58 virtual bool StartByteCounter() = 0; 58 virtual bool StartByteCounter() = 0;
59 59
60 // destroy any existing byte counter 60 // destroy any existing byte counter
61 // |parent_| will no longer receive updates after this call 61 // |parent_| will no longer receive updates after this call
62 virtual void StopByteCounter() = 0; 62 virtual void StopByteCounter() = 0;
63 63
64 // is the byte counter running? 64 // is the byte counter running?
65 virtual bool ByteCounterRunning() const = 0; 65 virtual bool ByteCounterRunning() const = 0;
66 66
67 // reset byte counter to an arbitrary baseline value
68 // counter will continue to run and increment relative to new baseline
69 // there must be an existing byte counter
70 // |parent_| must already have received at least one update
Eric Shienbrood 2011/02/10 18:47:00 parent_ is in the implementation class, so it's ki
Vince Laviano 2011/02/10 22:29:19 Done.
71 virtual void ResetByteCounter(uint64 rx_bytes, uint64 tx_bytes) = 0;
72
67 // factory 73 // factory
68 static Device* NewDevice(Service * const parent, 74 static Device* NewDevice(Service * const parent,
69 DBus::Connection& connection, // NOLINT 75 DBus::Connection& connection, // NOLINT
70 const DBus::Path& path); 76 const DBus::Path& path);
71 77
72 private: 78 private:
73 DISALLOW_COPY_AND_ASSIGN(Device); 79 DISALLOW_COPY_AND_ASSIGN(Device);
74 }; 80 };
75 81
76 } // namespace cashew 82 } // namespace cashew
77 83
78 #endif // SRC_DEVICE_H_ 84 #endif // SRC_DEVICE_H_
OLDNEW
« src/data_plan.h ('K') | « 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