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 #include "services/catalog/instance.h" | 5 #include "services/catalog/instance.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "services/catalog/entry.h" | 8 #include "services/catalog/entry.h" |
9 #include "services/catalog/manifest_provider.h" | 9 #include "services/catalog/manifest_provider.h" |
10 #include "services/catalog/reader.h" | 10 #include "services/catalog/reader.h" |
11 #include "services/catalog/store.h" | 11 #include "services/catalog/store.h" |
12 #include "services/shell/public/cpp/names.h" | 12 #include "services/service_manager/public/cpp/names.h" |
13 | 13 |
14 namespace catalog { | 14 namespace catalog { |
15 namespace { | 15 namespace { |
16 | 16 |
17 void AddEntry(const Entry& entry, std::vector<mojom::EntryPtr>* ary) { | 17 void AddEntry(const Entry& entry, std::vector<mojom::EntryPtr>* ary) { |
18 mojom::EntryPtr entry_ptr(mojom::Entry::New()); | 18 mojom::EntryPtr entry_ptr(mojom::Entry::New()); |
19 entry_ptr->name = entry.name(); | 19 entry_ptr->name = entry.name(); |
20 entry_ptr->display_name = entry.display_name(); | 20 entry_ptr->display_name = entry.display_name(); |
21 ary->push_back(std::move(entry_ptr)); | 21 ary->push_back(std::move(entry_ptr)); |
22 } | 22 } |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 void Instance::OnReadManifest(base::WeakPtr<Instance> instance, | 170 void Instance::OnReadManifest(base::WeakPtr<Instance> instance, |
171 const std::string& mojo_name, | 171 const std::string& mojo_name, |
172 const ResolveMojoNameCallback& callback, | 172 const ResolveMojoNameCallback& callback, |
173 shell::mojom::ResolveResultPtr result) { | 173 shell::mojom::ResolveResultPtr result) { |
174 callback.Run(std::move(result)); | 174 callback.Run(std::move(result)); |
175 if (instance) | 175 if (instance) |
176 instance->SerializeCatalog(); | 176 instance->SerializeCatalog(); |
177 } | 177 } |
178 | 178 |
179 } // namespace catalog | 179 } // namespace catalog |
OLD | NEW |