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

Side by Side Diff: ipc/ipc_sync_message_filter.cc

Issue 2697033004: Mojo C++ bindings: remove usage of AssociatedGroup from ipc/ (Closed)
Patch Set: . Created 3 years, 10 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 | « ipc/ipc_sync_message_filter.h ('k') | 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "ipc/ipc_sync_message_filter.h" 5 #include "ipc/ipc_sync_message_filter.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 } 165 }
166 166
167 return pending_message.send_result; 167 return pending_message.send_result;
168 } 168 }
169 169
170 void SyncMessageFilter::OnFilterAdded(Channel* channel) { 170 void SyncMessageFilter::OnFilterAdded(Channel* channel) {
171 std::vector<std::unique_ptr<Message>> pending_messages; 171 std::vector<std::unique_ptr<Message>> pending_messages;
172 { 172 {
173 base::AutoLock auto_lock(lock_); 173 base::AutoLock auto_lock(lock_);
174 channel_ = channel; 174 channel_ = channel;
175 Channel::AssociatedInterfaceSupport* support =
176 channel_->GetAssociatedInterfaceSupport();
177 if (support)
178 channel_associated_group_ = *support->GetAssociatedGroup();
179 175
180 io_task_runner_ = base::ThreadTaskRunnerHandle::Get(); 176 io_task_runner_ = base::ThreadTaskRunnerHandle::Get();
181 shutdown_watcher_.StartWatching( 177 shutdown_watcher_.StartWatching(
182 shutdown_event_, 178 shutdown_event_,
183 base::Bind(&SyncMessageFilter::OnShutdownEventSignaled, this)); 179 base::Bind(&SyncMessageFilter::OnShutdownEventSignaled, this));
184 io_message_loop_observer_->StartOnIOThread(); 180 io_message_loop_observer_->StartOnIOThread();
185 std::swap(pending_messages_, pending_messages); 181 std::swap(pending_messages_, pending_messages);
186 } 182 }
187 for (auto& msg : pending_messages) 183 for (auto& msg : pending_messages)
188 SendOnIOThread(msg.release()); 184 SendOnIOThread(msg.release());
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 if (!channel_) 279 if (!channel_)
284 return; 280 return;
285 281
286 Channel::AssociatedInterfaceSupport* support = 282 Channel::AssociatedInterfaceSupport* support =
287 channel_->GetAssociatedInterfaceSupport(); 283 channel_->GetAssociatedInterfaceSupport();
288 support->GetGenericRemoteAssociatedInterface( 284 support->GetGenericRemoteAssociatedInterface(
289 interface_name, std::move(handle)); 285 interface_name, std::move(handle));
290 } 286 }
291 287
292 } // namespace IPC 288 } // namespace IPC
OLDNEW
« no previous file with comments | « ipc/ipc_sync_message_filter.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698