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 "mojo/services/catalog/catalog.h" | 5 #include "mojo/services/catalog/catalog.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/json/json_file_value_serializer.h" | 8 #include "base/json/json_file_value_serializer.h" |
9 #include "base/strings/string_split.h" | 9 #include "base/strings/string_split.h" |
10 #include "base/task_runner_util.h" | 10 #include "base/task_runner_util.h" |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 shell_resolver_bindings_.AddBinding(this, std::move(request)); | 105 shell_resolver_bindings_.AddBinding(this, std::move(request)); |
106 } | 106 } |
107 | 107 |
108 void Catalog::BindCatalog(mojom::CatalogRequest request) { | 108 void Catalog::BindCatalog(mojom::CatalogRequest request) { |
109 catalog_bindings_.AddBinding(this, std::move(request)); | 109 catalog_bindings_.AddBinding(this, std::move(request)); |
110 } | 110 } |
111 | 111 |
112 //////////////////////////////////////////////////////////////////////////////// | 112 //////////////////////////////////////////////////////////////////////////////// |
113 // Catalog, mojom::Resolver: | 113 // Catalog, mojom::Resolver: |
114 | 114 |
115 void Catalog::ResolveResponse(mojo::URLResponsePtr response, | |
116 const ResolveResponseCallback& callback) { | |
117 // TODO(beng): implement. | |
118 } | |
119 | |
120 void Catalog::ResolveInterfaces(mojo::Array<mojo::String> interfaces, | 115 void Catalog::ResolveInterfaces(mojo::Array<mojo::String> interfaces, |
121 const ResolveInterfacesCallback& callback) { | 116 const ResolveInterfacesCallback& callback) { |
122 // TODO(beng): implement. | 117 // TODO(beng): implement. |
123 } | 118 } |
124 | 119 |
125 void Catalog::ResolveMIMEType(const mojo::String& mime_type, | 120 void Catalog::ResolveMIMEType(const mojo::String& mime_type, |
126 const ResolveMIMETypeCallback& callback) { | 121 const ResolveMIMETypeCallback& callback) { |
127 // TODO(beng): implement. | 122 // TODO(beng): implement. |
128 } | 123 } |
129 | 124 |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
245 EntryCache* catalog = is_system_catalog ? system_catalog_ : &user_catalog_; | 240 EntryCache* catalog = is_system_catalog ? system_catalog_ : &user_catalog_; |
246 if (catalog->end() != catalog->find(entry->name())) | 241 if (catalog->end() != catalog->find(entry->name())) |
247 return; | 242 return; |
248 for (auto child : entry->applications()) | 243 for (auto child : entry->applications()) |
249 AddEntryToCatalog(make_scoped_ptr(child), is_system_catalog); | 244 AddEntryToCatalog(make_scoped_ptr(child), is_system_catalog); |
250 (*catalog)[entry->name()] = std::move(entry); | 245 (*catalog)[entry->name()] = std::move(entry); |
251 SerializeCatalog(); | 246 SerializeCatalog(); |
252 } | 247 } |
253 | 248 |
254 } // namespace catalog | 249 } // namespace catalog |
OLD | NEW |