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

Unified Diff: tools/android/md5sum/md5sum.cc

Issue 1869503004: Convert //tools to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase, change iwyu fixes for converted directories to include <memory> 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
« no previous file with comments | « tools/android/forwarder2/self_deleter_helper.h ('k') | tools/battor_agent/battor_agent.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/android/md5sum/md5sum.cc
diff --git a/tools/android/md5sum/md5sum.cc b/tools/android/md5sum/md5sum.cc
index 94efa10ce419bb9855d18b59c0e01196e49df2d3..eaee434deb575a72ef293a4f0676a613e3d9589b 100644
--- a/tools/android/md5sum/md5sum.cc
+++ b/tools/android/md5sum/md5sum.cc
@@ -9,6 +9,7 @@
#include <fstream>
#include <iostream>
+#include <memory>
#include <set>
#include <string>
@@ -17,7 +18,6 @@
#include "base/files/file_util.h"
#include "base/logging.h"
#include "base/md5.h"
-#include "base/memory/scoped_ptr.h"
namespace {
@@ -31,7 +31,7 @@ bool MD5Sum(const char* path, std::string* digest_string) {
base::MD5Context ctx;
base::MD5Init(&ctx);
const size_t kBufferSize = 1 << 16;
- scoped_ptr<char[]> buf(new char[kBufferSize]);
+ std::unique_ptr<char[]> buf(new char[kBufferSize]);
size_t len;
while ((len = fread(buf.get(), 1, kBufferSize, file.get())) > 0)
base::MD5Update(&ctx, base::StringPiece(buf.get(), len));
« no previous file with comments | « tools/android/forwarder2/self_deleter_helper.h ('k') | tools/battor_agent/battor_agent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698