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

Unified Diff: mojo/application/public/cpp/lib/application_impl.cc

Issue 1231493002: mandoline filesystem: Save cookie data to the mojo:filesystem. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nits + observers Created 5 years, 5 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/application/public/cpp/lib/application_impl.cc
diff --git a/mojo/application/public/cpp/lib/application_impl.cc b/mojo/application/public/cpp/lib/application_impl.cc
index f1c6e42c6015935f9724c90519cf9858463e8289..b3f45a3bbece094a34f09c031ea2a19f079ac9ac 100644
--- a/mojo/application/public/cpp/lib/application_impl.cc
+++ b/mojo/application/public/cpp/lib/application_impl.cc
@@ -166,7 +166,14 @@ void ApplicationImpl::OnQuitRequested(const Callback<void(bool)>& callback) {
void ApplicationImpl::OnConnectionError() {
base::WeakPtr<ApplicationImpl> ptr(weak_factory_.GetWeakPtr());
- QuitNow();
+
+ // We give the delegate notice first, since it might want to do something on
+ // shell connection errors other than immediate termination of the run
+ // loop. The application might want to continue servicing connections other
+ // than the one to the shell.
+ bool quit_now = delegate_->OnShellConnectionError();
+ if (quit_now)
+ QuitNow();
if (!ptr)
return;
shell_ = nullptr;

Powered by Google App Engine
This is Rietveld 408576698