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> |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
66 void LogSocketChallengeReplyEvent(int channel_id, | 66 void LogSocketChallengeReplyEvent(int channel_id, |
67 const AuthResult& auth_result); | 67 const AuthResult& auth_result); |
68 | 68 |
69 void LogSocketEventForMessage(int channel_id, | 69 void LogSocketEventForMessage(int channel_id, |
70 proto::EventType event_type, | 70 proto::EventType event_type, |
71 const std::string& message_namespace, | 71 const std::string& message_namespace, |
72 const std::string& details); | 72 const std::string& details); |
73 | 73 |
74 // Assembles logs collected so far and return it as a serialized Log proto, | 74 // Assembles logs collected so far and return it as a serialized Log proto, |
75 // compressed in gzip format. | 75 // compressed in gzip format. |
76 // If serialization or compression failed, returns a NULL pointer. | 76 // If serialization or compression failed, returns a nullptr pointer. |
imcheng
2015/01/15 19:26:45
rm pointer
Kevin M
2015/01/27 00:56:45
Done.
| |
77 // |length|: If successful, assigned with size of compressed content. | 77 // |length|: If successful, assigned with size of compressed content. |
78 scoped_ptr<char[]> GetLogs(size_t* length) const; | 78 scoped_ptr<char[]> GetLogs(size_t* length) const; |
79 | 79 |
80 // Clears the internal map. | 80 // Clears the internal map. |
81 void Reset(); | 81 void Reset(); |
82 | 82 |
83 // Returns the last errors logged for |channel_id|. If the the logs for | 83 // Returns the last errors logged for |channel_id|. If the the logs for |
84 // |channel_id| are evicted before this is called, returns a LastErrors with | 84 // |channel_id| are evicted before this is called, returns a LastErrors with |
85 // no errors. This may happen if errors are logged and retrieved in different | 85 // no errors. This may happen if errors are logged and retrieved in different |
86 // tasks. | 86 // tasks. |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
132 | 132 |
133 base::ThreadChecker thread_checker_; | 133 base::ThreadChecker thread_checker_; |
134 | 134 |
135 DISALLOW_COPY_AND_ASSIGN(Logger); | 135 DISALLOW_COPY_AND_ASSIGN(Logger); |
136 }; | 136 }; |
137 } // namespace cast_channel | 137 } // namespace cast_channel |
138 } // namespace core_api | 138 } // namespace core_api |
139 } // namespace extensions | 139 } // namespace extensions |
140 | 140 |
141 #endif // EXTENSIONS_BROWSER_API_CAST_CHANNEL_LOGGER_H_ | 141 #endif // EXTENSIONS_BROWSER_API_CAST_CHANNEL_LOGGER_H_ |
OLD | NEW |