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

Unified Diff: chrome/browser/safe_browsing/safe_browsing_util.cc

Issue 1870003002: Convert //chrome/browser/safe_browsing from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and address comments Created 4 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
Index: chrome/browser/safe_browsing/safe_browsing_util.cc
diff --git a/chrome/browser/safe_browsing/safe_browsing_util.cc b/chrome/browser/safe_browsing/safe_browsing_util.cc
index 2197eac7b857864cb06d208e54c6bfaac2fce77b..273c0fed921659d3128cbe8db390d1f3e0d991ce 100644
--- a/chrome/browser/safe_browsing/safe_browsing_util.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_util.cc
@@ -15,7 +15,7 @@ namespace safe_browsing {
// SBChunkData -----------------------------------------------------------------
-// TODO(shess): Right now this contains a scoped_ptr<ChunkData> so that the
+// TODO(shess): Right now this contains a std::unique_ptr<ChunkData> so that the
// proto buffer isn't copied all over the place, then these are contained in a
// ScopedVector for purposes of passing things around between tasks. This seems
// convoluted. Maybe it would make sense to have an overall container class
@@ -24,7 +24,7 @@ namespace safe_browsing {
SBChunkData::SBChunkData() {
}
-SBChunkData::SBChunkData(scoped_ptr<ChunkData> data)
+SBChunkData::SBChunkData(std::unique_ptr<ChunkData> data)
: chunk_data_(std::move(data)) {
DCHECK(chunk_data_.get());
}
@@ -33,7 +33,7 @@ SBChunkData::~SBChunkData() {
}
bool SBChunkData::ParseFrom(const unsigned char* data, size_t length) {
- scoped_ptr<ChunkData> chunk(new ChunkData());
+ std::unique_ptr<ChunkData> chunk(new ChunkData());
if (!chunk->ParseFromArray(data, length))
return false;
« no previous file with comments | « chrome/browser/safe_browsing/safe_browsing_util.h ('k') | chrome/browser/safe_browsing/srt_fetcher_browsertest_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698