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

Side by Side Diff: services/flog/flog_logger_impl.h

Issue 2046703002: Add 'flog' service implementation. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 6 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
(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 #ifndef MOJO_SERVICES_FLOG_FLOG_LOGGER_IMPL_H_
6 #define MOJO_SERVICES_FLOG_FLOG_LOGGER_IMPL_H_
7
8 #include <memory>
9 #include <vector>
10
11 #include "mojo/public/cpp/bindings/binding.h"
12 #include "services/flog/flog_directory.h"
13 #include "services/flog/flog_service_impl.h"
14
15 namespace mojo {
16 namespace flog {
17
18 // FlogLogger implementation.
19 class FlogLoggerImpl : public FlogServiceImpl::ProductBase,
20 MessageReceiverWithResponderStatus {
21 public:
22 static std::shared_ptr<FlogLoggerImpl> Create(
23 InterfaceRequest<FlogLogger> request,
24 uint32_t log_id,
25 const std::string& label,
26 std::shared_ptr<FlogDirectory> directory,
27 FlogServiceImpl* owner);
28
29 ~FlogLoggerImpl() override;
30
31 // MessageReceiverWithResponderStatus implementation.
32 bool Accept(Message* message) override;
33
34 bool AcceptWithResponder(Message* message,
35 MessageReceiverWithStatus* responder) override;
36
37 private:
38 FlogLoggerImpl(InterfaceRequest<FlogLogger> request,
39 uint32_t log_id,
40 const std::string& label,
41 std::shared_ptr<FlogDirectory> directory,
42 FlogServiceImpl* owner);
43
44 void WriteData(uint32_t data_size, const void* data);
45
46 std::unique_ptr<mojo::internal::Router> router_;
47 files::FilePtr file_;
48 };
49
50 } // namespace flog
51 } // namespace mojo
52
53 #endif // MOJO_SERVICES_FLOG_FLOG_LOGGER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698