| OLD | NEW |
| 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 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 class TaskRunner; | 23 class TaskRunner; |
| 24 } | 24 } |
| 25 | 25 |
| 26 namespace mojo{ | 26 namespace mojo{ |
| 27 class ShellConnection; | 27 class ShellConnection; |
| 28 } | 28 } |
| 29 | 29 |
| 30 namespace catalog { | 30 namespace catalog { |
| 31 | 31 |
| 32 class Catalog; | 32 class Catalog; |
| 33 class Reader; |
| 33 class Store; | 34 class Store; |
| 34 | 35 |
| 35 // Creates and owns an instance of the catalog. Exposes a ShellClientPtr that | 36 // Creates and owns an instance of the catalog. Exposes a ShellClientPtr that |
| 36 // can be passed to the Shell, potentially in a different process. | 37 // can be passed to the Shell, potentially in a different process. |
| 37 class Factory | 38 class Factory |
| 38 : public mojo::ShellClient, | 39 : public mojo::ShellClient, |
| 39 public mojo::InterfaceFactory<mojom::Catalog>, | 40 public mojo::InterfaceFactory<mojom::Catalog>, |
| 40 public mojo::InterfaceFactory<mojom::Resolver>, | 41 public mojo::InterfaceFactory<mojom::Resolver>, |
| 41 public mojo::InterfaceFactory<mojo::shell::mojom::ShellResolver> { | 42 public mojo::InterfaceFactory<mojo::shell::mojom::ShellResolver> { |
| 42 public: | 43 public: |
| (...skipping 21 matching lines...) Expand all Loading... |
| 64 Catalog* GetCatalogForUserId(const std::string& user_id); | 65 Catalog* GetCatalogForUserId(const std::string& user_id); |
| 65 | 66 |
| 66 base::TaskRunner* file_task_runner_; | 67 base::TaskRunner* file_task_runner_; |
| 67 scoped_ptr<Store> store_; | 68 scoped_ptr<Store> store_; |
| 68 | 69 |
| 69 mojo::shell::mojom::ShellClientPtr shell_client_; | 70 mojo::shell::mojom::ShellClientPtr shell_client_; |
| 70 scoped_ptr<mojo::ShellConnection> shell_connection_; | 71 scoped_ptr<mojo::ShellConnection> shell_connection_; |
| 71 | 72 |
| 72 std::map<std::string, scoped_ptr<Catalog>> catalogs_; | 73 std::map<std::string, scoped_ptr<Catalog>> catalogs_; |
| 73 | 74 |
| 75 scoped_ptr<Reader> system_reader_; |
| 74 EntryCache system_catalog_; | 76 EntryCache system_catalog_; |
| 75 | 77 |
| 76 base::WeakPtrFactory<Factory> weak_factory_; | 78 base::WeakPtrFactory<Factory> weak_factory_; |
| 77 | 79 |
| 78 DISALLOW_COPY_AND_ASSIGN(Factory); | 80 DISALLOW_COPY_AND_ASSIGN(Factory); |
| 79 }; | 81 }; |
| 80 | 82 |
| 81 } // namespace catalog | 83 } // namespace catalog |
| 82 | 84 |
| 83 #endif // MOJO_SERVICES_CATALOG_FACTORY_H_ | 85 #endif // MOJO_SERVICES_CATALOG_FACTORY_H_ |
| OLD | NEW |