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

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: Fix windows comiple error. 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
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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 void AttachmentBroker::RemoveObserver(AttachmentBroker::Observer* observer) { 64 void AttachmentBroker::RemoveObserver(AttachmentBroker::Observer* observer) {
65 base::AutoLock auto_lock(*get_lock()); 65 base::AutoLock auto_lock(*get_lock());
66 auto it = std::find_if(observers_.begin(), observers_.end(), 66 auto it = std::find_if(observers_.begin(), observers_.end(),
67 [observer](const ObserverInfo& info) { 67 [observer](const ObserverInfo& info) {
68 return info.observer == observer; 68 return info.observer == observer;
69 }); 69 });
70 if (it != observers_.end()) 70 if (it != observers_.end())
71 observers_.erase(it); 71 observers_.erase(it);
72 } 72 }
73 73
74 void AttachmentBroker::RegisterCommunicationChannel(Endpoint* endpoint) { 74 void AttachmentBroker::RegisterCommunicationChannel(
75 Endpoint* endpoint,
76 scoped_refptr<base::SingleThreadTaskRunner> runner) {
75 NOTREACHED(); 77 NOTREACHED();
76 } 78 }
77 79
78 void AttachmentBroker::DeregisterCommunicationChannel(Endpoint* endpoint) { 80 void AttachmentBroker::DeregisterCommunicationChannel(Endpoint* endpoint) {
79 NOTREACHED(); 81 NOTREACHED();
80 } 82 }
81 83
82 void AttachmentBroker::RegisterBrokerCommunicationChannel(Endpoint* endpoint) { 84 void AttachmentBroker::RegisterBrokerCommunicationChannel(Endpoint* endpoint) {
83 NOTREACHED(); 85 NOTREACHED();
84 } 86 }
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 138
137 observer->ReceivedBrokerableAttachmentWithId(id); 139 observer->ReceivedBrokerableAttachmentWithId(id);
138 } 140 }
139 141
140 AttachmentBroker::ObserverInfo::ObserverInfo() {} 142 AttachmentBroker::ObserverInfo::ObserverInfo() {}
141 AttachmentBroker::ObserverInfo::ObserverInfo(const ObserverInfo& other) = 143 AttachmentBroker::ObserverInfo::ObserverInfo(const ObserverInfo& other) =
142 default; 144 default;
143 AttachmentBroker::ObserverInfo::~ObserverInfo() {} 145 AttachmentBroker::ObserverInfo::~ObserverInfo() {}
144 146
145 } // namespace IPC 147 } // namespace IPC
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698