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

Side by Side Diff: extensions/browser/api/cast_channel/logger.h

Issue 555283002: Create new class "CastTransport", which encapsulates the message read and write event loops. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed wez's feedback. Created 6 years, 3 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
OLDNEW
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 10
(...skipping 24 matching lines...) Expand all
35 class Logger : public base::RefCounted<Logger> { 35 class Logger : public base::RefCounted<Logger> {
36 public: 36 public:
37 // |clock|: Clock used for generating timestamps for the events. Owned by 37 // |clock|: Clock used for generating timestamps for the events. Owned by
38 // this class. 38 // this class.
39 // |unix_epoch_time_ticks|: The TimeTicks that corresponds to Unix epoch. 39 // |unix_epoch_time_ticks|: The TimeTicks that corresponds to Unix epoch.
40 Logger(scoped_ptr<base::TickClock> clock, 40 Logger(scoped_ptr<base::TickClock> clock,
41 base::TimeTicks unix_epoch_time_ticks); 41 base::TimeTicks unix_epoch_time_ticks);
42 42
43 // For newly created sockets. Will create an event and log a 43 // For newly created sockets. Will create an event and log a
44 // CAST_SOCKET_CREATED event. 44 // CAST_SOCKET_CREATED event.
45 void LogNewSocketEvent(const CastSocket& cast_socket); 45 void LogNewSocketEvent(const CastSocketImpl& cast_socket);
46 46
47 void LogSocketEvent(int channel_id, proto::EventType event_type); 47 void LogSocketEvent(int channel_id, proto::EventType event_type);
48 void LogSocketEventWithDetails(int channel_id, 48 void LogSocketEventWithDetails(int channel_id,
49 proto::EventType event_type, 49 proto::EventType event_type,
50 const std::string& details); 50 const std::string& details);
51 51
52 // For events that involves socket / crypto operations that returns a value. 52 // For events that involves socket / crypto operations that returns a value.
53 void LogSocketEventWithRv(int channel_id, 53 void LogSocketEventWithRv(int channel_id,
54 proto::EventType event_type, 54 proto::EventType event_type,
55 int rv); 55 int rv);
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 131
132 base::ThreadChecker thread_checker_; 132 base::ThreadChecker thread_checker_;
133 133
134 DISALLOW_COPY_AND_ASSIGN(Logger); 134 DISALLOW_COPY_AND_ASSIGN(Logger);
135 }; 135 };
136 } // namespace cast_channel 136 } // namespace cast_channel
137 } // namespace api 137 } // namespace api
138 } // namespace extensions 138 } // namespace extensions
139 139
140 #endif // EXTENSIONS_BROWSER_API_CAST_CHANNEL_LOGGER_H_ 140 #endif // EXTENSIONS_BROWSER_API_CAST_CHANNEL_LOGGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698