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

Side by Side Diff: services/catalog/reader.cc

Issue 1916183004: Eliminate support for V0 manifests, migrate all to V1. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@explicit
Patch Set: . Created 4 years, 7 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
« no previous file with comments | « services/catalog/entry.cc ('k') | services/shell/runner/child/manifest.json » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #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"
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 base::Bind(&ProcessManifest, base::Passed(&manifest_root), 176 base::Bind(&ProcessManifest, base::Passed(&manifest_root),
177 system_package_dir_), 177 system_package_dir_),
178 base::Bind(&Reader::OnReadManifest, weak_factory_.GetWeakPtr(), 178 base::Bind(&Reader::OnReadManifest, weak_factory_.GetWeakPtr(),
179 cache, entry_created_callback)); 179 cache, entry_created_callback));
180 } else { 180 } else {
181 base::PostTaskAndReplyWithResult( 181 base::PostTaskAndReplyWithResult(
182 file_task_runner_, FROM_HERE, 182 file_task_runner_, FROM_HERE,
183 base::Bind(&ReadManifest, system_package_dir_, mojo_name), 183 base::Bind(&ReadManifest, system_package_dir_, mojo_name),
184 base::Bind(&Reader::OnReadManifest, weak_factory_.GetWeakPtr(), 184 base::Bind(&Reader::OnReadManifest, weak_factory_.GetWeakPtr(),
185 cache, entry_created_callback)); 185 cache, entry_created_callback));
186
187 } 186 }
188 } 187 }
189 188
190 void Reader::OnReadManifest( 189 void Reader::OnReadManifest(
191 EntryCache* cache, 190 EntryCache* cache,
192 const CreateEntryForNameCallback& entry_created_callback, 191 const CreateEntryForNameCallback& entry_created_callback,
193 std::unique_ptr<Entry> entry) { 192 std::unique_ptr<Entry> entry) {
194 shell::mojom::ResolveResultPtr result = 193 shell::mojom::ResolveResultPtr result =
195 shell::mojom::ResolveResult::From(*entry); 194 shell::mojom::ResolveResult::From(*entry);
196 AddEntryToCache(cache, std::move(entry)); 195 AddEntryToCache(cache, std::move(entry));
197 entry_created_callback.Run(std::move(result)); 196 entry_created_callback.Run(std::move(result));
198 } 197 }
199 198
200 } // namespace catalog 199 } // namespace catalog
OLDNEW
« no previous file with comments | « services/catalog/entry.cc ('k') | services/shell/runner/child/manifest.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698