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

Side by Side 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "mojo/application/public/cpp/application_impl.h" 5 #include "mojo/application/public/cpp/application_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 // If by the time we got the reply from the shell, more requests had come in 159 // If by the time we got the reply from the shell, more requests had come in
160 // then we don't want to quit the app anymore so we return false. Otherwise 160 // then we don't want to quit the app anymore so we return false. Otherwise
161 // |quit_requested_| is true so we tell the shell to proceed with the quit. 161 // |quit_requested_| is true so we tell the shell to proceed with the quit.
162 callback.Run(quit_requested_); 162 callback.Run(quit_requested_);
163 if (quit_requested_) 163 if (quit_requested_)
164 QuitNow(); 164 QuitNow();
165 } 165 }
166 166
167 void ApplicationImpl::OnConnectionError() { 167 void ApplicationImpl::OnConnectionError() {
168 base::WeakPtr<ApplicationImpl> ptr(weak_factory_.GetWeakPtr()); 168 base::WeakPtr<ApplicationImpl> ptr(weak_factory_.GetWeakPtr());
169 QuitNow(); 169
170 // We give the delegate notice first, since it might want to do something on
171 // shell connection errors other than immediate termination of the run
172 // loop. The application might want to continue servicing connections other
173 // than the one to the shell.
174 bool quit_now = delegate_->OnShellConnectionError();
175 if (quit_now)
176 QuitNow();
170 if (!ptr) 177 if (!ptr)
171 return; 178 return;
172 shell_ = nullptr; 179 shell_ = nullptr;
173 } 180 }
174 181
175 } // namespace mojo 182 } // namespace mojo
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698