summaryrefslogtreecommitdiffstats
path: root/mojo/services
diff options
context:
space:
mode:
authorsky <sky@chromium.org>2016-03-22 14:44:16 -0700
committerCommit bot <commit-bot@chromium.org>2016-03-22 21:45:57 +0000
commit340545a9d2c2bf94d93421bbb6bfa40596ae4523 (patch)
tree7e13a15630e87d0c8c0bd19a2bacd1062eebdbbf /mojo/services
parent56d49295ef5c22d1fbc71d491494944cf1709bb3 (diff)
downloadchromium_src-340545a9d2c2bf94d93421bbb6bfa40596ae4523.zip
chromium_src-340545a9d2c2bf94d93421bbb6bfa40596ae4523.tar.gz
chromium_src-340545a9d2c2bf94d93421bbb6bfa40596ae4523.tar.bz2
Quit the message loop by default in ShellConnectionLost when ApplicationRunner is used
This was originally at https://codereview.chromium.org/1814223002/ , but Ben is out and I need this for tests, so I'm taking over. BUG=none TEST=covered by tests TBR=ben@chromium.org R=ben@chromium.org Committed: https://crrev.com/a50f9840749052fbdec087a304548217cc6fd00b Cr-Commit-Position: refs/heads/master@{#382389} Review URL: https://codereview.chromium.org/1819063002 Cr-Commit-Position: refs/heads/master@{#382688}
Diffstat (limited to 'mojo/services')
-rw-r--r--mojo/services/network/network_service_delegate.cc4
-rw-r--r--mojo/services/network/network_service_delegate.h1
-rw-r--r--mojo/services/tracing/tracing_app.cc6
-rw-r--r--mojo/services/tracing/tracing_app.h2
4 files changed, 6 insertions, 7 deletions
diff --git a/mojo/services/network/network_service_delegate.cc b/mojo/services/network/network_service_delegate.cc
index 1970928..b257331 100644
--- a/mojo/services/network/network_service_delegate.cc
+++ b/mojo/services/network/network_service_delegate.cc
@@ -78,10 +78,6 @@ bool NetworkServiceDelegate::AcceptConnection(Connection* connection) {
return true;
}
-void NetworkServiceDelegate::ShellConnectionLost() {
- base::MessageLoop::current()->QuitWhenIdle();
-}
-
void NetworkServiceDelegate::Create(Connection* connection,
InterfaceRequest<NetworkService> request) {
new NetworkServiceImpl(ref_factory_.CreateRef(), std::move(request));
diff --git a/mojo/services/network/network_service_delegate.h b/mojo/services/network/network_service_delegate.h
index 8997097..7098939 100644
--- a/mojo/services/network/network_service_delegate.h
+++ b/mojo/services/network/network_service_delegate.h
@@ -38,7 +38,6 @@ class NetworkServiceDelegate : public ShellClient,
void Initialize(Connector* connector, const Identity& identity,
uint32_t id) override;
bool AcceptConnection(Connection* connection) override;
- void ShellConnectionLost() override;
// InterfaceFactory<NetworkService> implementation.
void Create(Connection* connection,
diff --git a/mojo/services/tracing/tracing_app.cc b/mojo/services/tracing/tracing_app.cc
index 65b4421..d921a6d 100644
--- a/mojo/services/tracing/tracing_app.cc
+++ b/mojo/services/tracing/tracing_app.cc
@@ -42,8 +42,12 @@ bool TracingApp::AcceptConnection(mojo::Connection* connection) {
return true;
}
-void TracingApp::ShellConnectionLost() {
+bool TracingApp::ShellConnectionLost() {
+ // TODO(beng): This is only required because TracingApp isn't run by
+ // ApplicationRunner - instead it's launched automatically by the standalone
+ // shell. It shouldn't be.
base::MessageLoop::current()->QuitWhenIdle();
+ return false;
}
void TracingApp::Create(mojo::Connection* connection,
diff --git a/mojo/services/tracing/tracing_app.h b/mojo/services/tracing/tracing_app.h
index 17f4132..eb5934a 100644
--- a/mojo/services/tracing/tracing_app.h
+++ b/mojo/services/tracing/tracing_app.h
@@ -34,7 +34,7 @@ class TracingApp
private:
// mojo::ShellClient implementation.
bool AcceptConnection(mojo::Connection* connection) override;
- void ShellConnectionLost() override;
+ bool ShellConnectionLost() override;
// mojo::InterfaceFactory<TraceCollector> implementation.
void Create(mojo::Connection* connection,