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

Side by Side Diff: net/base/network_activity_monitor.h

Issue 2733283002: Require explicit selection of traits for LazyInstance (Closed)
Patch Set: l10n again Created 3 years, 9 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
« no previous file with comments | « net/base/mime_util.cc ('k') | net/cert/cert_verify_proc_mac.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) 2014 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2014 The Chromium 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 NET_BASE_NETWORK_ACTIVITY_MONITOR_H_ 5 #ifndef NET_BASE_NETWORK_ACTIVITY_MONITOR_H_
6 #define NET_BASE_NETWORK_ACTIVITY_MONITOR_H_ 6 #define NET_BASE_NETWORK_ACTIVITY_MONITOR_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 uint64_t GetBytesSent() const; 44 uint64_t GetBytesSent() const;
45 45
46 base::TimeDelta GetTimeSinceLastReceived() const; 46 base::TimeDelta GetTimeSinceLastReceived() const;
47 base::TimeDelta GetTimeSinceLastSent() const; 47 base::TimeDelta GetTimeSinceLastSent() const;
48 48
49 private: 49 private:
50 friend class test::NetworkActivityMonitorPeer; 50 friend class test::NetworkActivityMonitorPeer;
51 51
52 NetworkActivityMonitor(); 52 NetworkActivityMonitor();
53 ~NetworkActivityMonitor(); 53 ~NetworkActivityMonitor();
54 friend struct base::DefaultLazyInstanceTraits<NetworkActivityMonitor>; 54 friend struct base::LazyInstanceTraitsBase<NetworkActivityMonitor>;
55 55
56 // Protects all the following members. 56 // Protects all the following members.
57 mutable base::Lock lock_; 57 mutable base::Lock lock_;
58 58
59 uint64_t bytes_received_; 59 uint64_t bytes_received_;
60 uint64_t bytes_sent_; 60 uint64_t bytes_sent_;
61 61
62 base::TimeTicks last_received_ticks_; 62 base::TimeTicks last_received_ticks_;
63 base::TimeTicks last_sent_ticks_; 63 base::TimeTicks last_sent_ticks_;
64 64
65 DISALLOW_COPY_AND_ASSIGN(NetworkActivityMonitor); 65 DISALLOW_COPY_AND_ASSIGN(NetworkActivityMonitor);
66 }; 66 };
67 67
68 } // namespace net 68 } // namespace net
69 69
70 #endif // NET_BASE_NETWORK_ACTIVITY_MONITOR_H_ 70 #endif // NET_BASE_NETWORK_ACTIVITY_MONITOR_H_
OLDNEW
« no previous file with comments | « net/base/mime_util.cc ('k') | net/cert/cert_verify_proc_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698