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

Side by Side Diff: third_party/WebKit/Source/modules/websockets/DocumentWebSocketChannel.cpp

Issue 2761693002: Wrapped PassRefPtrs in move where passed to RefPtr constructor. (Closed)
Patch Set: Added move wraps for multiple instances in 1 line. Created 3 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 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 m_handle.reset(); 340 m_handle.reset();
341 m_client = nullptr; 341 m_client = nullptr;
342 m_identifier = 0; 342 m_identifier = 0;
343 } 343 }
344 344
345 DocumentWebSocketChannel::Message::Message(const CString& text) 345 DocumentWebSocketChannel::Message::Message(const CString& text)
346 : type(MessageTypeText), text(text) {} 346 : type(MessageTypeText), text(text) {}
347 347
348 DocumentWebSocketChannel::Message::Message( 348 DocumentWebSocketChannel::Message::Message(
349 PassRefPtr<BlobDataHandle> blobDataHandle) 349 PassRefPtr<BlobDataHandle> blobDataHandle)
350 : type(MessageTypeBlob), blobDataHandle(blobDataHandle) {} 350 : type(MessageTypeBlob), blobDataHandle(std::move(blobDataHandle)) {}
351 351
352 DocumentWebSocketChannel::Message::Message(DOMArrayBuffer* arrayBuffer) 352 DocumentWebSocketChannel::Message::Message(DOMArrayBuffer* arrayBuffer)
353 : type(MessageTypeArrayBuffer), arrayBuffer(arrayBuffer) {} 353 : type(MessageTypeArrayBuffer), arrayBuffer(arrayBuffer) {}
354 354
355 DocumentWebSocketChannel::Message::Message( 355 DocumentWebSocketChannel::Message::Message(
356 std::unique_ptr<Vector<char>> vectorData, 356 std::unique_ptr<Vector<char>> vectorData,
357 MessageType type) 357 MessageType type)
358 : type(type), vectorData(std::move(vectorData)) { 358 : type(type), vectorData(std::move(vectorData)) {
359 DCHECK(type == MessageTypeTextAsCharVector || 359 DCHECK(type == MessageTypeTextAsCharVector ||
360 type == MessageTypeBinaryAsCharVector); 360 type == MessageTypeBinaryAsCharVector);
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
720 WebSocketChannel::trace(visitor); 720 WebSocketChannel::trace(visitor);
721 } 721 }
722 722
723 std::ostream& operator<<(std::ostream& ostream, 723 std::ostream& operator<<(std::ostream& ostream,
724 const DocumentWebSocketChannel* channel) { 724 const DocumentWebSocketChannel* channel) {
725 return ostream << "DocumentWebSocketChannel " 725 return ostream << "DocumentWebSocketChannel "
726 << static_cast<const void*>(channel); 726 << static_cast<const void*>(channel);
727 } 727 }
728 728
729 } // namespace blink 729 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698