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

Unified Diff: mojo/system/message_in_transit_queue.h

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 | « no previous file | mojo/system/message_in_transit_queue.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.h
diff --git a/mojo/system/message_in_transit_queue.h b/mojo/system/message_in_transit_queue.h
index 2c1f4c70591b60a39780b930d0b241607a3f818d..a32f424bc93399c668e8ae8bbc6eac8da2a31c40 100644
--- a/mojo/system/message_in_transit_queue.h
+++ b/mojo/system/message_in_transit_queue.h
@@ -21,12 +21,6 @@ namespace system {
class MOJO_SYSTEM_IMPL_EXPORT MessageInTransitQueue {
public:
MessageInTransitQueue();
-
- struct PassContents {};
- // Constructor that takes over the contents of another
- // |MessageInTransitQueue|, leaving it empty.
- MessageInTransitQueue(PassContents, MessageInTransitQueue* other);
-
~MessageInTransitQueue();
bool IsEmpty() const { return queue_.empty(); }
@@ -50,6 +44,9 @@ class MOJO_SYSTEM_IMPL_EXPORT MessageInTransitQueue {
void Clear();
+ // Efficiently swaps contents with |*other|.
+ void Swap(MessageInTransitQueue* other);
+
private:
// TODO(vtl): When C++11 is available, switch this to a deque of
// |scoped_ptr|/|unique_ptr|s.
« no previous file with comments | « no previous file | mojo/system/message_in_transit_queue.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698