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

Side by Side Diff: services/catalog/catalog.h

Issue 2611183006: Service Manager: Miscellaneous catalog cleanup (Closed)
Patch Set: Created 3 years, 11 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
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 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 SERVICES_CATALOG_CATALOG_H_ 5 #ifndef SERVICES_CATALOG_CATALOG_H_
6 #define SERVICES_CATALOG_CATALOG_H_ 6 #define SERVICES_CATALOG_CATALOG_H_
7 7
8 #include <map> 8 #include <map>
9 #include <memory> 9 #include <memory>
10 #include <string> 10 #include <string>
11 11
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "base/memory/weak_ptr.h" 13 #include "base/memory/weak_ptr.h"
14 #include "components/filesystem/public/interfaces/directory.mojom.h" 14 #include "components/filesystem/public/interfaces/directory.mojom.h"
15 #include "mojo/public/cpp/bindings/binding.h" 15 #include "mojo/public/cpp/bindings/binding.h"
16 #include "mojo/public/cpp/bindings/binding_set.h" 16 #include "mojo/public/cpp/bindings/binding_set.h"
17 #include "services/catalog/public/interfaces/catalog.mojom.h" 17 #include "services/catalog/public/interfaces/catalog.mojom.h"
18 #include "services/catalog/types.h"
19 #include "services/service_manager/public/cpp/interface_factory.h" 18 #include "services/service_manager/public/cpp/interface_factory.h"
20 #include "services/service_manager/public/cpp/service.h" 19 #include "services/service_manager/public/cpp/service.h"
21 #include "services/service_manager/public/interfaces/resolver.mojom.h" 20 #include "services/service_manager/public/interfaces/resolver.mojom.h"
22 #include "services/service_manager/public/interfaces/service.mojom.h" 21 #include "services/service_manager/public/interfaces/service.mojom.h"
23 22
24 namespace base { 23 namespace base {
25 class SequencedWorkerPool; 24 class SequencedWorkerPool;
26 class SingleThreadTaskRunner; 25 class SingleThreadTaskRunner;
27 class Value; 26 class Value;
28 } 27 }
29 28
30 namespace filesystem { 29 namespace filesystem {
31 class LockTable; 30 class LockTable;
32 } 31 }
33 32
34 namespace service_manager { 33 namespace service_manager {
35 class ServiceContext; 34 class ServiceContext;
36 } 35 }
37 36
38 namespace catalog { 37 namespace catalog {
39 38
39 class EntryCache;
40 class Instance; 40 class Instance;
41 class ManifestProvider; 41 class ManifestProvider;
42 class Reader; 42 class Reader;
43 43
44 // Creates and owns an instance of the catalog. Exposes a ServicePtr that 44 // Creates and owns an instance of the catalog. Exposes a ServicePtr that
45 // can be passed to the service manager, potentially in a different process. 45 // can be passed to the service manager, potentially in a different process.
46 class Catalog 46 class Catalog
47 : public service_manager::InterfaceFactory<mojom::Catalog>, 47 : public service_manager::InterfaceFactory<mojom::Catalog>,
48 public service_manager::InterfaceFactory<filesystem::mojom::Directory>, 48 public service_manager::InterfaceFactory<filesystem::mojom::Directory>,
49 public service_manager::InterfaceFactory< 49 public service_manager::InterfaceFactory<
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 Instance* GetInstanceForUserId(const std::string& user_id); 104 Instance* GetInstanceForUserId(const std::string& user_id);
105 105
106 void SystemPackageDirScanned(); 106 void SystemPackageDirScanned();
107 107
108 service_manager::mojom::ServicePtr service_; 108 service_manager::mojom::ServicePtr service_;
109 std::unique_ptr<service_manager::ServiceContext> service_context_; 109 std::unique_ptr<service_manager::ServiceContext> service_context_;
110 110
111 std::map<std::string, std::unique_ptr<Instance>> instances_; 111 std::map<std::string, std::unique_ptr<Instance>> instances_;
112 112
113 std::unique_ptr<Reader> system_reader_; 113 std::unique_ptr<Reader> system_reader_;
114 EntryCache system_cache_; 114 const std::unique_ptr<EntryCache> system_cache_;
115 bool loaded_ = false; 115 bool loaded_ = false;
116 116
117 scoped_refptr<filesystem::LockTable> lock_table_; 117 scoped_refptr<filesystem::LockTable> lock_table_;
118 118
119 mojo::BindingSet<mojom::CatalogControl> control_bindings_; 119 mojo::BindingSet<mojom::CatalogControl> control_bindings_;
120 120
121 base::WeakPtrFactory<Catalog> weak_factory_; 121 base::WeakPtrFactory<Catalog> weak_factory_;
122 122
123 DISALLOW_COPY_AND_ASSIGN(Catalog); 123 DISALLOW_COPY_AND_ASSIGN(Catalog);
124 }; 124 };
125 125
126 } // namespace catalog 126 } // namespace catalog
127 127
128 #endif // SERVICES_CATALOG_CATALOG_H_ 128 #endif // SERVICES_CATALOG_CATALOG_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698