OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 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 EXTENSIONS_BROWSER_API_CAST_CHANNEL_LOGGER_H_ | 5 #ifndef EXTENSIONS_BROWSER_API_CAST_CHANNEL_LOGGER_H_ |
6 #define EXTENSIONS_BROWSER_API_CAST_CHANNEL_LOGGER_H_ | 6 #define EXTENSIONS_BROWSER_API_CAST_CHANNEL_LOGGER_H_ |
7 | 7 |
8 #include <deque> | 8 #include <deque> |
9 #include <map> | 9 #include <map> |
10 #include <string> | 10 #include <string> |
11 | 11 |
12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
13 #include "base/memory/linked_ptr.h" | 13 #include "base/memory/linked_ptr.h" |
14 #include "base/memory/ref_counted.h" | 14 #include "base/memory/ref_counted.h" |
15 #include "base/memory/scoped_ptr.h" | 15 #include "base/memory/scoped_ptr.h" |
16 #include "base/threading/thread_checker.h" | 16 #include "base/threading/thread_checker.h" |
17 #include "extensions/browser/api/cast_channel/logger_util.h" | 17 #include "extensions/browser/api/cast_channel/logger_util.h" |
18 #include "extensions/common/api/cast_channel/logging.pb.h" | 18 #include "extensions/common/api/cast_channel/logging.pb.h" |
19 #include "net/base/ip_endpoint.h" | 19 #include "net/base/ip_endpoint.h" |
20 | 20 |
21 namespace base { | 21 namespace base { |
22 class TickClock; | 22 class TickClock; |
23 } | 23 } |
24 | 24 |
25 namespace extensions { | 25 namespace extensions { |
26 namespace core_api { | 26 namespace api { |
27 namespace cast_channel { | 27 namespace cast_channel { |
28 | 28 |
29 struct AuthResult; | 29 struct AuthResult; |
30 class CastSocket; | 30 class CastSocket; |
31 | 31 |
32 static const int kMaxSocketsToLog = 50; | 32 static const int kMaxSocketsToLog = 50; |
33 static const int kMaxEventsPerSocket = 2000; | 33 static const int kMaxEventsPerSocket = 2000; |
34 | 34 |
35 // Logs information of each channel and sockets and exports the log as | 35 // Logs information of each channel and sockets and exports the log as |
36 // a blob. Logger is done on the IO thread. | 36 // a blob. Logger is done on the IO thread. |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 base::TimeTicks unix_epoch_time_ticks_; | 129 base::TimeTicks unix_epoch_time_ticks_; |
130 | 130 |
131 // Log proto holding global statistics. | 131 // Log proto holding global statistics. |
132 proto::Log log_; | 132 proto::Log log_; |
133 | 133 |
134 base::ThreadChecker thread_checker_; | 134 base::ThreadChecker thread_checker_; |
135 | 135 |
136 DISALLOW_COPY_AND_ASSIGN(Logger); | 136 DISALLOW_COPY_AND_ASSIGN(Logger); |
137 }; | 137 }; |
138 } // namespace cast_channel | 138 } // namespace cast_channel |
139 } // namespace core_api | 139 } // namespace api |
140 } // namespace extensions | 140 } // namespace extensions |
141 | 141 |
142 #endif // EXTENSIONS_BROWSER_API_CAST_CHANNEL_LOGGER_H_ | 142 #endif // EXTENSIONS_BROWSER_API_CAST_CHANNEL_LOGGER_H_ |
OLD | NEW |