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

Side by Side Diff: services/blamer/public/cpp/blamer_interface.h

Issue 2885363004: [Hacky prototype] Create a shared-memory high-performance reporting service.
Patch Set: Created 3 years, 7 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 2017 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 SERVICES_BLAMER_PUBLIC_CPP_BLAMER_INTERFACE_H_
6 #define SERVICES_BLAMER_PUBLIC_CPP_BLAMER_INTERFACE_H_
7
8 #include "base/macros.h"
9 #include "services/service_manager/public/cpp/connector.h"
10 #include "services/blamer/public/interfaces/shared_memory_heap_registry.mojom.h"
11
12 namespace blamer {
13
14 class SharedMemoryHeap;
15
16 class BlamerInterface {
17 public:
18 ~BlamerInterface();
19
20 // Creates an instance of this service in the current process. If an instance
21 // already exists then returns the existing one.
22 BlamerInterface* CreateForProcess(service_manager::Connector* connector);
23
24 // Returns a singleton instance of this service in the current process.
25 BlamerInterface* GetForProcess();
26
27 // Returns the shared memory heap associated with this instance of the
28 // service.
29 SharedMemoryHeap* shared_memory_heap() const {
30 return shared_memory_heap_.get();
31 }
32
33 private:
34 BlamerInterface(service_manager::Connector* connector);
35
36 std::unique_ptr<SharedMemoryHeap> shared_memory_heap_;
37
38 DISALLOW_COPY_AND_ASSIGN(BlamerInterface);
39 };
40
41 } // namespace blamer
42
43 #endif // SERVICES_BLAMER_PUBLIC_CPP_BLAMER_INTERFACE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698