| 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/reader.h" | 5 #include "services/catalog/reader.h" | 
| 6 | 6 | 
| 7 #include "base/bind.h" | 7 #include "base/bind.h" | 
| 8 #include "base/files/file_enumerator.h" | 8 #include "base/files/file_enumerator.h" | 
| 9 #include "base/files/file_util.h" | 9 #include "base/files/file_util.h" | 
| 10 #include "base/json/json_file_value_serializer.h" | 10 #include "base/json/json_file_value_serializer.h" | 
| 11 #include "base/json/json_reader.h" | 11 #include "base/json/json_reader.h" | 
| 12 #include "base/memory/ptr_util.h" | 12 #include "base/memory/ptr_util.h" | 
| 13 #include "base/path_service.h" | 13 #include "base/path_service.h" | 
| 14 #include "base/task_runner_util.h" | 14 #include "base/task_runner_util.h" | 
| 15 #include "base/thread_task_runner_handle.h" | 15 #include "base/threading/thread_task_runner_handle.h" | 
| 16 #include "services/catalog/constants.h" | 16 #include "services/catalog/constants.h" | 
| 17 #include "services/catalog/entry.h" | 17 #include "services/catalog/entry.h" | 
| 18 #include "services/catalog/manifest_provider.h" | 18 #include "services/catalog/manifest_provider.h" | 
| 19 #include "services/shell/public/cpp/names.h" | 19 #include "services/shell/public/cpp/names.h" | 
| 20 | 20 | 
| 21 namespace catalog { | 21 namespace catalog { | 
| 22 namespace { | 22 namespace { | 
| 23 | 23 | 
| 24 base::FilePath GetManifestPath(const base::FilePath& package_dir, | 24 base::FilePath GetManifestPath(const base::FilePath& package_dir, | 
| 25                                const std::string& name) { | 25                                const std::string& name) { | 
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 205     EntryCache* cache, | 205     EntryCache* cache, | 
| 206     const CreateEntryForNameCallback& entry_created_callback, | 206     const CreateEntryForNameCallback& entry_created_callback, | 
| 207     std::unique_ptr<Entry> entry) { | 207     std::unique_ptr<Entry> entry) { | 
| 208   shell::mojom::ResolveResultPtr result = | 208   shell::mojom::ResolveResultPtr result = | 
| 209       shell::mojom::ResolveResult::From(*entry); | 209       shell::mojom::ResolveResult::From(*entry); | 
| 210   AddEntryToCache(cache, std::move(entry)); | 210   AddEntryToCache(cache, std::move(entry)); | 
| 211   entry_created_callback.Run(std::move(result)); | 211   entry_created_callback.Run(std::move(result)); | 
| 212 } | 212 } | 
| 213 | 213 | 
| 214 }  // namespace catalog | 214 }  // namespace catalog | 
| OLD | NEW | 
|---|