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

Side by Side Diff: ipc/attachment_broker.cc

Issue 1739203004: Add support for Attachment Brokering of IPC::Channels on multiple threads. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. 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 | « ipc/attachment_broker.h ('k') | ipc/attachment_broker_mac_unittest.cc » ('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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/attachment_broker.h" 5 #include "ipc/attachment_broker.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 void AttachmentBroker::RemoveObserver(AttachmentBroker::Observer* observer) { 74 void AttachmentBroker::RemoveObserver(AttachmentBroker::Observer* observer) {
75 base::AutoLock auto_lock(*get_lock()); 75 base::AutoLock auto_lock(*get_lock());
76 auto it = std::find_if(observers_.begin(), observers_.end(), 76 auto it = std::find_if(observers_.begin(), observers_.end(),
77 [observer](const ObserverInfo& info) { 77 [observer](const ObserverInfo& info) {
78 return info.observer == observer; 78 return info.observer == observer;
79 }); 79 });
80 if (it != observers_.end()) 80 if (it != observers_.end())
81 observers_.erase(it); 81 observers_.erase(it);
82 } 82 }
83 83
84 void AttachmentBroker::RegisterCommunicationChannel(Endpoint* endpoint) { 84 void AttachmentBroker::RegisterCommunicationChannel(
85 Endpoint* endpoint,
86 scoped_refptr<base::SingleThreadTaskRunner> runner) {
85 NOTREACHED(); 87 NOTREACHED();
86 } 88 }
87 89
88 void AttachmentBroker::DeregisterCommunicationChannel(Endpoint* endpoint) { 90 void AttachmentBroker::DeregisterCommunicationChannel(Endpoint* endpoint) {
89 NOTREACHED(); 91 NOTREACHED();
90 } 92 }
91 93
92 void AttachmentBroker::RegisterBrokerCommunicationChannel(Endpoint* endpoint) { 94 void AttachmentBroker::RegisterBrokerCommunicationChannel(Endpoint* endpoint) {
93 NOTREACHED(); 95 NOTREACHED();
94 } 96 }
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 148
147 observer->ReceivedBrokerableAttachmentWithId(id); 149 observer->ReceivedBrokerableAttachmentWithId(id);
148 } 150 }
149 151
150 AttachmentBroker::ObserverInfo::ObserverInfo() {} 152 AttachmentBroker::ObserverInfo::ObserverInfo() {}
151 AttachmentBroker::ObserverInfo::ObserverInfo(const ObserverInfo& other) = 153 AttachmentBroker::ObserverInfo::ObserverInfo(const ObserverInfo& other) =
152 default; 154 default;
153 AttachmentBroker::ObserverInfo::~ObserverInfo() {} 155 AttachmentBroker::ObserverInfo::~ObserverInfo() {}
154 156
155 } // namespace IPC 157 } // namespace IPC
OLDNEW
« no previous file with comments | « ipc/attachment_broker.h ('k') | ipc/attachment_broker_mac_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698