OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "mojo/services/flog/cpp/flog.h" |
| 6 |
| 7 namespace mojo { |
| 8 namespace flog { |
| 9 |
| 10 // static |
| 11 std::atomic_ulong Flog::last_allocated_channel_id_; |
| 12 |
| 13 // static |
| 14 FlogLoggerPtr Flog::logger_; |
| 15 |
| 16 FlogChannel::FlogChannel(const char* channel_type_name) |
| 17 : id_(Flog::AllocateChannelId()) { |
| 18 Flog::LogChannelCreation(id_, channel_type_name); |
| 19 } |
| 20 |
| 21 FlogChannel::~FlogChannel() { |
| 22 Flog::LogChannelDeletion(id_); |
| 23 } |
| 24 |
| 25 bool FlogChannel::Accept(Message* message) { |
| 26 Flog::LogChannelMessage(id_, message); |
| 27 return true; |
| 28 } |
| 29 |
| 30 bool FlogChannel::AcceptWithResponder(Message* message, |
| 31 MessageReceiver* responder) { |
| 32 MOJO_DCHECK(false) << "Flog doesn't support messages with responses"; |
| 33 abort(); |
| 34 } |
| 35 |
| 36 } // namespace flog |
| 37 } // namespace mojo |
OLD | NEW |