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

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

Issue 1749043002: [mojo-edk] Disable sync broker shared memory creation on Mac. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 | no next file » | 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 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 parent->RequestPortMerge(port.name(), token); 185 parent->RequestPortMerge(port.name(), token);
186 return; 186 return;
187 } 187 }
188 188
189 base::AutoLock lock(pending_port_merges_lock_); 189 base::AutoLock lock(pending_port_merges_lock_);
190 pending_port_merges_.push_back(std::make_pair(token, port)); 190 pending_port_merges_.push_back(std::make_pair(token, port));
191 } 191 }
192 192
193 scoped_refptr<PlatformSharedBuffer> NodeController::CreateSharedBuffer( 193 scoped_refptr<PlatformSharedBuffer> NodeController::CreateSharedBuffer(
194 size_t num_bytes) { 194 size_t num_bytes) {
195 #if defined(OS_POSIX) 195 // TODO(amistry): Fix sync broker and re-enable on OSX.
196 #if defined(OS_POSIX) && !defined(OS_MACOSX)
196 // Shared buffer creation failure is fatal, so always use the broker when we 197 // Shared buffer creation failure is fatal, so always use the broker when we
197 // have one. This does mean that a non-root process that has children will use 198 // have one. This does mean that a non-root process that has children will use
198 // the broker for shared buffer creation even though that process is 199 // the broker for shared buffer creation even though that process is
199 // privileged. 200 // privileged.
200 if (broker_) { 201 if (broker_) {
201 return broker_->GetSharedBuffer(num_bytes); 202 return broker_->GetSharedBuffer(num_bytes);
202 } 203 }
203 #endif 204 #endif
204 return PlatformSharedBuffer::Create(num_bytes); 205 return PlatformSharedBuffer::Create(num_bytes);
205 } 206 }
(...skipping 671 matching lines...) Expand 10 before | Expand all | Expand 10 after
877 shutdown_callback_.Reset(); 878 shutdown_callback_.Reset();
878 } 879 }
879 880
880 DCHECK(!callback.is_null()); 881 DCHECK(!callback.is_null());
881 882
882 callback.Run(); 883 callback.Run();
883 } 884 }
884 885
885 } // namespace edk 886 } // namespace edk
886 } // namespace mojo 887 } // namespace mojo
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698