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

Unified Diff: net/spdy/core/spdy_header_block.cc

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_framer_test.cc ('k') | net/spdy/core/spdy_header_indexing_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/core/spdy_header_block.cc
diff --git a/net/spdy/core/spdy_header_block.cc b/net/spdy/core/spdy_header_block.cc
index 8475b2e7a7e545031fa3860bab3da3215f340549..66d6f51b7cd16eaa05cbb15bb08ff4b6c2dfae82 100644
--- a/net/spdy/core/spdy_header_block.cc
+++ b/net/spdy/core/spdy_header_block.cc
@@ -16,6 +16,7 @@
#include "net/http/http_log_util.h"
#include "net/log/net_log_capture_mode.h"
#include "net/spdy/platform/api/spdy_estimate_memory_usage.h"
+#include "net/spdy/platform/api/spdy_ptr_util.h"
#include "net/spdy/platform/api/spdy_string_utils.h"
namespace net {
@@ -321,8 +322,8 @@ void SpdyHeaderBlock::AppendHeader(const SpdyStringPiece key,
}
SpdyHeaderBlock::Storage* SpdyHeaderBlock::GetStorage() {
- if (!storage_) {
- storage_.reset(new Storage);
+ if (storage_ == nullptr) {
+ storage_ = SpdyMakeUnique<Storage>();
}
return storage_.get();
}
« no previous file with comments | « net/spdy/core/spdy_framer_test.cc ('k') | net/spdy/core/spdy_header_indexing_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698