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

Unified Diff: ipc/ipc_channel_reader.cc

Issue 1414503009: IPC: Remove unnecessary conversions of BrokerableAttachment. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments from tsepez. Created 5 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ipc/ipc_channel_posix.cc ('k') | ipc/ipc_channel_reader_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/ipc_channel_reader.cc
diff --git a/ipc/ipc_channel_reader.cc b/ipc/ipc_channel_reader.cc
index 66e3f17528c4a8b777762baa464b15e15a1fadf6..86dde9de320fc84dfa83ca7cf746266c0d95f79e 100644
--- a/ipc/ipc_channel_reader.cc
+++ b/ipc/ipc_channel_reader.cc
@@ -250,9 +250,9 @@ ChannelReader::AttachmentIdSet ChannelReader::GetBrokeredAttachments(
#if USE_ATTACHMENT_BROKER
MessageAttachmentSet* set = msg->attachment_set();
- std::vector<BrokerableAttachment*> brokerable_attachments_copy =
- set->GetBrokerableAttachments();
- for (const BrokerableAttachment* attachment : brokerable_attachments_copy) {
+ std::vector<scoped_refptr<IPC::BrokerableAttachment>>
+ brokerable_attachments_copy(set->GetBrokerableAttachments());
+ for (const auto& attachment : brokerable_attachments_copy) {
if (attachment->NeedsBrokering()) {
AttachmentBroker* broker = GetAttachmentBroker();
DCHECK(broker);
« no previous file with comments | « ipc/ipc_channel_posix.cc ('k') | ipc/ipc_channel_reader_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698