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

Side by Side Diff: mojo/edk/system/node_controller.cc

Issue 2236473003: [mojo-edk] Revert ObserveProxy retransmission behavior (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2785
Patch Set: Created 4 years, 4 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
« no previous file with comments | « no previous file | mojo/edk/system/ports/node.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/edk/system/node_controller.h" 5 #include "mojo/edk/system/node_controller.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 1175 matching lines...) Expand 10 before | Expand all | Expand 10 after
1186 1186
1187 void NodeController::AttemptShutdownIfRequested() { 1187 void NodeController::AttemptShutdownIfRequested() {
1188 if (!shutdown_callback_flag_) 1188 if (!shutdown_callback_flag_)
1189 return; 1189 return;
1190 1190
1191 base::Closure callback; 1191 base::Closure callback;
1192 { 1192 {
1193 base::AutoLock lock(shutdown_lock_); 1193 base::AutoLock lock(shutdown_lock_);
1194 if (shutdown_callback_.is_null()) 1194 if (shutdown_callback_.is_null())
1195 return; 1195 return;
1196 if (!node_->CanShutdownCleanly(true /* allow_local_ports */)) { 1196 if (!node_->CanShutdownCleanly(
1197 ports::Node::ShutdownPolicy::ALLOW_LOCAL_PORTS)) {
1197 DVLOG(2) << "Unable to cleanly shut down node " << name_; 1198 DVLOG(2) << "Unable to cleanly shut down node " << name_;
1198 return; 1199 return;
1199 } 1200 }
1200 1201
1201 callback = shutdown_callback_; 1202 callback = shutdown_callback_;
1202 shutdown_callback_.Reset(); 1203 shutdown_callback_.Reset();
1203 shutdown_callback_flag_.Set(false); 1204 shutdown_callback_flag_.Set(false);
1204 } 1205 }
1205 1206
1206 DCHECK(!callback.is_null()); 1207 DCHECK(!callback.is_null());
1207 1208
1208 callback.Run(); 1209 callback.Run();
1209 } 1210 }
1210 1211
1211 } // namespace edk 1212 } // namespace edk
1212 } // namespace mojo 1213 } // namespace mojo
OLDNEW
« no previous file with comments | « no previous file | mojo/edk/system/ports/node.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698