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

Unified Diff: mojo/services/catalog/catalog.h

Issue 1828733004: Load application manifests from resources (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: mojo/services/catalog/catalog.h
diff --git a/mojo/services/catalog/catalog.h b/mojo/services/catalog/catalog.h
index 8d59b45a2caac240ef87726e317a6ce2b2112bf2..abd859b90d494a524475472f5c98e6bd2ebdab53 100644
--- a/mojo/services/catalog/catalog.h
+++ b/mojo/services/catalog/catalog.h
@@ -8,6 +8,7 @@
#include "base/files/file_path.h"
#include "base/memory/weak_ptr.h"
#include "base/path_service.h"
+#include "base/strings/string_piece.h"
#include "base/values.h"
#include "mojo/public/cpp/bindings/binding_set.h"
#include "mojo/services/catalog/entry.h"
@@ -32,7 +33,17 @@ class Catalog : public mojom::Resolver,
public mojo::shell::mojom::ShellResolver,
public mojom::Catalog {
public:
- Catalog(scoped_ptr<Store> store, base::TaskRunner* file_task_runner);
+ class Delegate {
+ public:
+ virtual ~Delegate() {}
+ virtual bool GetApplicationManifest(const base::StringPiece& name,
+ std::string* manifest_contents) = 0;
+ };
+
+ // |delegate| may be null.
+ Catalog(scoped_ptr<Store> store,
+ base::TaskRunner* file_task_runner,
+ Delegate* delegate);
~Catalog() override;
void BindResolver(mojom::ResolverRequest request);
@@ -78,6 +89,8 @@ class Catalog : public mojom::Resolver,
// via callback.
void AddEntryToCatalog(scoped_ptr<Entry> entry);
+ Delegate* delegate_;
+
// Directory that contains packages and executables visible to all users.
base::FilePath system_package_dir_;

Powered by Google App Engine
This is Rietveld 408576698