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

Side by Side Diff: src/device_impl.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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/device.h ('k') | src/device_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_IMPL_H_ 5 #ifndef SRC_DEVICE_IMPL_H_
6 #define SRC_DEVICE_IMPL_H_ 6 #define SRC_DEVICE_IMPL_H_
7 7
8 #include <glib.h> 8 #include <glib.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 // PropertyChangedDelegate methods 47 // PropertyChangedDelegate methods
48 48
49 virtual void OnPropertyChanged(const PropertyChangedHandler *handler, 49 virtual void OnPropertyChanged(const PropertyChangedHandler *handler,
50 const std::string& property_name, 50 const std::string& property_name,
51 const DBus::Variant& new_value); 51 const DBus::Variant& new_value);
52 52
53 // Service methods 53 // Service methods
54 virtual bool StartByteCounter(); 54 virtual bool StartByteCounter();
55 virtual void StopByteCounter(); 55 virtual void StopByteCounter();
56 virtual bool ByteCounterRunning() const; 56 virtual bool ByteCounterRunning() const;
57 virtual void ResetByteCounter(uint64 rx_bytes, uint64 tx_bytes);
57 58
58 // ByteCounterDelegate methods 59 // ByteCounterDelegate methods
59 60
60 // called when bye counter is updated 61 // called when byte counter is updated
61 virtual void OnByteCounterUpdate(const ByteCounter *counter, 62 virtual void OnByteCounterUpdate(const ByteCounter *counter,
62 uint64 rx_bytes, uint64 tx_bytes); 63 uint64 rx_bytes, uint64 tx_bytes);
63 64
64 private: 65 private:
65 // back pointer to our parent Service 66 // back pointer to our parent Service
66 Service * const parent_; 67 Service * const parent_;
67 68
68 // D-Bus path for Flimflam device that we represent 69 // D-Bus path for Flimflam device that we represent
69 // this is our unique identifier 70 // this is our unique identifier
70 const DBus::Path path_; 71 const DBus::Path path_;
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 127
127 // delete byte counter object pointed to by |byte_counter_| if any 128 // delete byte counter object pointed to by |byte_counter_| if any
128 void DeleteByteCounter(); 129 void DeleteByteCounter();
129 130
130 DISALLOW_COPY_AND_ASSIGN(DeviceImpl); 131 DISALLOW_COPY_AND_ASSIGN(DeviceImpl);
131 }; 132 };
132 133
133 } // namespace cashew 134 } // namespace cashew
134 135
135 #endif // SRC_DEVICE_IMPL_H_ 136 #endif // SRC_DEVICE_IMPL_H_
OLDNEW
« no previous file with comments | « src/device.h ('k') | src/device_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698