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

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

Issue 1844973002: Implement a system-level entry cache so that packages loaded from the system dir can be visible to … (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 8 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 MOJO_SERVICES_CATALOG_FACTORY_H_ 5 #ifndef MOJO_SERVICES_CATALOG_FACTORY_H_
6 #define MOJO_SERVICES_CATALOG_FACTORY_H_ 6 #define MOJO_SERVICES_CATALOG_FACTORY_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 #include "base/memory/weak_ptr.h" 13 #include "base/memory/weak_ptr.h"
14 #include "mojo/public/cpp/bindings/binding.h" 14 #include "mojo/public/cpp/bindings/binding.h"
15 #include "mojo/services/catalog/public/interfaces/catalog.mojom.h" 15 #include "mojo/services/catalog/public/interfaces/catalog.mojom.h"
16 #include "mojo/services/catalog/public/interfaces/resolver.mojom.h" 16 #include "mojo/services/catalog/public/interfaces/resolver.mojom.h"
17 #include "mojo/services/catalog/types.h"
17 #include "mojo/shell/public/cpp/shell_client.h" 18 #include "mojo/shell/public/cpp/shell_client.h"
18 #include "mojo/shell/public/interfaces/shell_client.mojom.h" 19 #include "mojo/shell/public/interfaces/shell_client.mojom.h"
19 #include "mojo/shell/public/interfaces/shell_resolver.mojom.h" 20 #include "mojo/shell/public/interfaces/shell_resolver.mojom.h"
20 21
21 namespace base { 22 namespace base {
22 class TaskRunner; 23 class TaskRunner;
23 } 24 }
24 25
25 namespace mojo{ 26 namespace mojo{
26 class ShellConnection; 27 class ShellConnection;
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 Catalog* GetCatalogForUserId(const std::string& user_id); 64 Catalog* GetCatalogForUserId(const std::string& user_id);
64 65
65 base::TaskRunner* file_task_runner_; 66 base::TaskRunner* file_task_runner_;
66 scoped_ptr<Store> store_; 67 scoped_ptr<Store> store_;
67 68
68 mojo::shell::mojom::ShellClientPtr shell_client_; 69 mojo::shell::mojom::ShellClientPtr shell_client_;
69 scoped_ptr<mojo::ShellConnection> shell_connection_; 70 scoped_ptr<mojo::ShellConnection> shell_connection_;
70 71
71 std::map<std::string, scoped_ptr<Catalog>> catalogs_; 72 std::map<std::string, scoped_ptr<Catalog>> catalogs_;
72 73
74 EntryCache system_catalog_;
75
73 base::WeakPtrFactory<Factory> weak_factory_; 76 base::WeakPtrFactory<Factory> weak_factory_;
74 77
75 DISALLOW_COPY_AND_ASSIGN(Factory); 78 DISALLOW_COPY_AND_ASSIGN(Factory);
76 }; 79 };
77 80
78 } // namespace catalog 81 } // namespace catalog
79 82
80 #endif // MOJO_SERVICES_CATALOG_FACTORY_H_ 83 #endif // MOJO_SERVICES_CATALOG_FACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698