| Index: services/catalog/reader.cc
|
| diff --git a/services/catalog/reader.cc b/services/catalog/reader.cc
|
| index bc2242fd65ed439b8c0994c5c70b325979b0537b..08a8a918f98934cd33a809d6c4a59ddbd48da549 100644
|
| --- a/services/catalog/reader.cc
|
| +++ b/services/catalog/reader.cc
|
| @@ -178,24 +178,25 @@
|
| const std::string& mojo_name,
|
| EntryCache* cache,
|
| const CreateEntryForNameCallback& entry_created_callback) {
|
| - if (manifest_provider_) {
|
| + std::string manifest_contents;
|
| + if (manifest_provider_ &&
|
| + manifest_provider_->GetApplicationManifest(mojo_name,
|
| + &manifest_contents)) {
|
| std::unique_ptr<base::Value> manifest_root =
|
| - manifest_provider_->GetManifest(mojo_name);
|
| - if (manifest_root) {
|
| - base::PostTaskAndReplyWithResult(
|
| - file_task_runner_.get(), FROM_HERE,
|
| - base::Bind(&ProcessManifest, base::Passed(&manifest_root),
|
| - system_package_dir_),
|
| - base::Bind(&Reader::OnReadManifest, weak_factory_.GetWeakPtr(), cache,
|
| - entry_created_callback));
|
| - return;
|
| - }
|
| - }
|
| - base::PostTaskAndReplyWithResult(
|
| - file_task_runner_.get(), FROM_HERE,
|
| - base::Bind(&ReadManifest, system_package_dir_, mojo_name),
|
| - base::Bind(&Reader::OnReadManifest, weak_factory_.GetWeakPtr(), cache,
|
| - entry_created_callback));
|
| + base::JSONReader::Read(manifest_contents);
|
| + base::PostTaskAndReplyWithResult(
|
| + file_task_runner_.get(), FROM_HERE,
|
| + base::Bind(&ProcessManifest, base::Passed(&manifest_root),
|
| + system_package_dir_),
|
| + base::Bind(&Reader::OnReadManifest, weak_factory_.GetWeakPtr(), cache,
|
| + entry_created_callback));
|
| + } else {
|
| + base::PostTaskAndReplyWithResult(
|
| + file_task_runner_.get(), FROM_HERE,
|
| + base::Bind(&ReadManifest, system_package_dir_, mojo_name),
|
| + base::Bind(&Reader::OnReadManifest, weak_factory_.GetWeakPtr(), cache,
|
| + entry_created_callback));
|
| + }
|
| }
|
|
|
| Reader::Reader(ManifestProvider* manifest_provider)
|
|
|