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

Unified Diff: net/spdy/core/spdy_protocol.h

Issue 2840563003: Implement SpdyMakeUnique and SpdyWrapUnique. (Closed)
Patch Set: Created 3 years, 8 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 | « net/spdy/core/spdy_prefixed_buffer_reader.cc ('k') | net/spdy/core/spdy_protocol.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/core/spdy_protocol.h
diff --git a/net/spdy/core/spdy_protocol.h b/net/spdy/core/spdy_protocol.h
index 6113bd6cadeaeac577657c7e9f83bbe7f16c7786..276275d27beafaac744b2c97e09dd6e0b59d172d 100644
--- a/net/spdy/core/spdy_protocol.h
+++ b/net/spdy/core/spdy_protocol.h
@@ -16,6 +16,7 @@
#include <limits>
#include <map>
#include <memory>
+#include <new>
#include <utility>
#include "base/compiler_specific.h"
@@ -27,6 +28,7 @@
#include "net/spdy/core/spdy_bitmasks.h"
#include "net/spdy/core/spdy_bug_tracker.h"
#include "net/spdy/core/spdy_header_block.h"
+#include "net/spdy/platform/api/spdy_ptr_util.h"
#include "net/spdy/platform/api/spdy_string.h"
#include "net/spdy/platform/api/spdy_string_piece.h"
@@ -491,7 +493,7 @@ class NET_EXPORT_PRIVATE SpdyDataIR
// Deep-copy of data (keep private copy).
void SetDataDeep(SpdyStringPiece data) {
- data_store_.reset(new SpdyString(data.data(), data.size()));
+ data_store_ = SpdyMakeUnique<SpdyString>(data.data(), data.size());
data_ = data_store_->data();
data_len_ = data.size();
}
« no previous file with comments | « net/spdy/core/spdy_prefixed_buffer_reader.cc ('k') | net/spdy/core/spdy_protocol.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698