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

Unified Diff: services/catalog/catalog.h

Issue 1921183003: Fixes race in Shell (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge 2 trunk Created 4 years, 8 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
« no previous file with comments | « content/browser/mojo/mojo_shell_context.cc ('k') | services/catalog/catalog.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/catalog/catalog.h
diff --git a/services/catalog/catalog.h b/services/catalog/catalog.h
index fb105e2a832ee0f3c3bcc9f95f939d16b2ce1de3..e9a32a891ba544c8633724ca3a460c6ea9cff3e5 100644
--- a/services/catalog/catalog.h
+++ b/services/catalog/catalog.h
@@ -19,7 +19,8 @@
#include "services/shell/public/interfaces/shell_resolver.mojom.h"
namespace base {
-class TaskRunner;
+class SequencedWorkerPool;
+class SingleThreadTaskRunner;
}
namespace shell {
@@ -40,7 +41,10 @@ class Catalog : public shell::ShellClient,
public shell::InterfaceFactory<shell::mojom::ShellResolver> {
public:
// |manifest_provider| may be null.
- Catalog(base::TaskRunner* file_task_runner,
+ Catalog(base::SequencedWorkerPool* worker_pool,
+ std::unique_ptr<Store> store,
+ ManifestProvider* manifest_provider);
+ Catalog(base::SingleThreadTaskRunner* task_runner,
std::unique_ptr<Store> store,
ManifestProvider* manifest_provider);
~Catalog() override;
@@ -48,6 +52,11 @@ class Catalog : public shell::ShellClient,
shell::mojom::ShellClientPtr TakeShellClient();
private:
+ explicit Catalog(std::unique_ptr<Store> store);
+
+ // Starts a scane for system packages.
+ void ScanSystemPackageDir();
+
// shell::ShellClient:
bool AcceptConnection(shell::Connection* connection) override;
@@ -63,7 +72,6 @@ class Catalog : public shell::ShellClient,
void SystemPackageDirScanned();
- base::TaskRunner* const file_task_runner_;
std::unique_ptr<Store> store_;
shell::mojom::ShellClientPtr shell_client_;
« no previous file with comments | « content/browser/mojo/mojo_shell_context.cc ('k') | services/catalog/catalog.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698