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

Unified Diff: mojo/shell/package_test_package.cc

Issue 1706063002: Eliminate ShellClientFactoryConnection & just have the ApplicationManager do it. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@factory
Patch Set: . Created 4 years, 10 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 | « mojo/shell/identity.cc ('k') | mojo/shell/public/cpp/connection.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/shell/package_test_package.cc
diff --git a/mojo/shell/package_test_package.cc b/mojo/shell/package_test_package.cc
index 010cb0dc992808305f6308b291953c728f24ada8..53a8bdf881973c49885901cf312353ab4fcbc57a 100644
--- a/mojo/shell/package_test_package.cc
+++ b/mojo/shell/package_test_package.cc
@@ -36,18 +36,15 @@ class ProvidedShellClient
public base::SimpleThread {
public:
ProvidedShellClient(const std::string& name,
- mojom::ShellClientRequest request,
- const Callback<void()>& destruct_callback)
+ mojom::ShellClientRequest request)
: base::SimpleThread(name),
name_(name),
request_(std::move(request)),
- destruct_callback_(destruct_callback),
shell_(nullptr) {
Start();
}
~ProvidedShellClient() override {
Join();
- destruct_callback_.Run();
}
private:
@@ -89,7 +86,6 @@ class ProvidedShellClient
const std::string name_;
mojom::ShellClientRequest request_;
- const Callback<void()> destruct_callback_;
Shell* shell_;
WeakBindingSet<test::mojom::PackageTestService> bindings_;
@@ -134,12 +130,11 @@ class PackageTestShellClient
// mojom::ShellClientFactory:
void CreateShellClient(mojom::ShellClientRequest request,
- const String& url,
- const Callback<void()>& destruct_callback) override {
+ const String& url) override {
if (url == "mojo://package_test_a/")
- new ProvidedShellClient("A", std::move(request), destruct_callback);
+ new ProvidedShellClient("A", std::move(request));
else if (url == "mojo://package_test_b/")
- new ProvidedShellClient("B", std::move(request), destruct_callback);
+ new ProvidedShellClient("B", std::move(request));
}
// test::mojom::PackageTestService:
« no previous file with comments | « mojo/shell/identity.cc ('k') | mojo/shell/public/cpp/connection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698