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

Unified Diff: mojo/system/message_in_transit_queue.cc

Issue 585633004: Mojo: Add a MessageInTransit::Swap() method and remove the "PassContents" ctor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 | « mojo/system/message_in_transit_queue.h ('k') | mojo/system/proxy_message_pipe_endpoint.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/system/message_in_transit_queue.cc
diff --git a/mojo/system/message_in_transit_queue.cc b/mojo/system/message_in_transit_queue.cc
index 48f77799e073757770489da943738a9e75b16b56..1ad5ecf0f68a2200c051964614021d25fd886926 100644
--- a/mojo/system/message_in_transit_queue.cc
+++ b/mojo/system/message_in_transit_queue.cc
@@ -13,11 +13,6 @@ namespace system {
MessageInTransitQueue::MessageInTransitQueue() {
}
-MessageInTransitQueue::MessageInTransitQueue(PassContents,
- MessageInTransitQueue* other) {
- queue_.swap(other->queue_);
-}
-
MessageInTransitQueue::~MessageInTransitQueue() {
if (!IsEmpty()) {
LOG(WARNING) << "Destroying nonempty message queue";
@@ -29,5 +24,9 @@ void MessageInTransitQueue::Clear() {
STLDeleteElements(&queue_);
}
+void MessageInTransitQueue::Swap(MessageInTransitQueue* other) {
+ queue_.swap(other->queue_);
+}
+
} // namespace system
} // namespace mojo
« no previous file with comments | « mojo/system/message_in_transit_queue.h ('k') | mojo/system/proxy_message_pipe_endpoint.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698