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 #include "extensions/browser/api/cast_channel/logger.h" | 5 #include "extensions/browser/api/cast_channel/logger.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/strings/string_util.h" | 9 #include "base/strings/string_util.h" |
10 #include "base/time/tick_clock.h" | 10 #include "base/time/tick_clock.h" |
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
244 LogSocketEvent(channel_id, event); | 244 LogSocketEvent(channel_id, event); |
245 } | 245 } |
246 | 246 |
247 void Logger::LogSocketEventForMessage(int channel_id, | 247 void Logger::LogSocketEventForMessage(int channel_id, |
248 EventType event_type, | 248 EventType event_type, |
249 const std::string& message_namespace, | 249 const std::string& message_namespace, |
250 const std::string& details) { | 250 const std::string& details) { |
251 DCHECK(thread_checker_.CalledOnValidThread()); | 251 DCHECK(thread_checker_.CalledOnValidThread()); |
252 | 252 |
253 SocketEvent event = CreateEvent(event_type); | 253 SocketEvent event = CreateEvent(event_type); |
254 if (StartsWithASCII(message_namespace, kInternalNamespacePrefix, false)) | 254 if (base::StartsWithASCII(message_namespace, kInternalNamespacePrefix, false)) |
255 event.set_message_namespace(message_namespace); | 255 event.set_message_namespace(message_namespace); |
256 event.set_details(details); | 256 event.set_details(details); |
257 | 257 |
258 LogSocketEvent(channel_id, event); | 258 LogSocketEvent(channel_id, event); |
259 } | 259 } |
260 | 260 |
261 void Logger::LogSocketChallengeReplyEvent(int channel_id, | 261 void Logger::LogSocketChallengeReplyEvent(int channel_id, |
262 const AuthResult& auth_result) { | 262 const AuthResult& auth_result) { |
263 DCHECK(thread_checker_.CalledOnValidThread()); | 263 DCHECK(thread_checker_.CalledOnValidThread()); |
264 | 264 |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
363 if (it != aggregated_socket_events_.end()) { | 363 if (it != aggregated_socket_events_.end()) { |
364 return it->second->last_errors; | 364 return it->second->last_errors; |
365 } else { | 365 } else { |
366 return LastErrors(); | 366 return LastErrors(); |
367 } | 367 } |
368 } | 368 } |
369 | 369 |
370 } // namespace cast_channel | 370 } // namespace cast_channel |
371 } // namespace core_api | 371 } // namespace core_api |
372 } // namespace extensions | 372 } // namespace extensions |
OLD | NEW |