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

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: Merge with ToT 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 da27be1c98b568ab6eb29f69bdf5b41944f11ba0..4214a9e6873204092f65f9f6099a84fcba1a483c 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