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

Unified Diff: chrome/common/safe_browsing/binary_feature_extractor.cc

Issue 1880143002: Convert chrome/common to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . 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/common/safe_browsing/binary_feature_extractor.cc
diff --git a/chrome/common/safe_browsing/binary_feature_extractor.cc b/chrome/common/safe_browsing/binary_feature_extractor.cc
index a7c3c0d753407a93a090794044c6055f039927b3..ed883db6a82e227c0a688c229dd186a95f11b39b 100644
--- a/chrome/common/safe_browsing/binary_feature_extractor.cc
+++ b/chrome/common/safe_browsing/binary_feature_extractor.cc
@@ -4,12 +4,12 @@
#include "chrome/common/safe_browsing/binary_feature_extractor.h"
+#include <memory>
#include <utility>
#include "base/files/file.h"
#include "base/files/file_path.h"
#include "base/files/memory_mapped_file.h"
-#include "base/memory/scoped_ptr.h"
#include "chrome/common/safe_browsing/csd.pb.h"
#include "crypto/secure_hash.h"
#include "crypto/sha2.h"
@@ -50,8 +50,8 @@ void BinaryFeatureExtractor::ExtractDigest(
base::File file(file_path, base::File::FLAG_OPEN | base::File::FLAG_READ);
if (file.IsValid()) {
const int kBufferSize = 1 << 12;
- scoped_ptr<char[]> buf(new char[kBufferSize]);
- scoped_ptr<crypto::SecureHash> ctx(
+ std::unique_ptr<char[]> buf(new char[kBufferSize]);
+ std::unique_ptr<crypto::SecureHash> ctx(
crypto::SecureHash::Create(crypto::SecureHash::SHA256));
int len = 0;
while (true) {
« no previous file with comments | « chrome/common/pepper_permission_util_unittest.cc ('k') | chrome/common/safe_browsing/binary_feature_extractor_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698