forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove many naked new statements from net/websockets.
This change is fairly mechanical and purely cosmetic. Use make_unique instead of creating an object with new and passing that into a unique_ptr constructor. (This often changes local variable type, but when passed as an argument an implicitly cast takes care of this). Use MakeRefCounted instead of creating an object with new and passing that into a scoped_refptr constructor. (This never changes variable type in this CL). Do these in constructor initializer lists as well. Remove unnecessary namespace qualifiers in a few places (where unique_ptr template parameter has it but new statement does not in the same line). Use assignment operator instead of reset() method of unique_ptr. Use std::move instead of two-step WrapUnique(unique_ptr.release()). Where object needs to be constructed with new statement and raw pointer is already available, use WrapUnique instead of passing the raw pointer to a unique_ptr constructor. Use auto where appropriate. Replace NULL by nullptr in one line which is touched anyway. Make sure to include memory for new, unique_ptr. Include scoped_refptr.h for scoped_refptr and MakeRefCounted. Delete unnecessary ref_counted.h include (only needed for RefCounted* base classes). Delete unnecessary memory include where corresponding header file already included it. Change-Id: I6fa58780e5ae89e2684aabdd21452b76be52a4f8 Reviewed-on: https://chromium-review.googlesource.com/946053 Commit-Queue: Bence Béky <bnc@chromium.org> Reviewed-by: Adam Rice <ricea@chromium.org> Cr-Commit-Position: refs/heads/master@{#540826}
- Loading branch information
Bence Béky
authored and
Commit Bot
committed
Mar 5, 2018
1 parent
ebe5bdf
commit 6562397
Showing
32 changed files
with
178 additions
and
255 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.