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

Unified Diff: chrome/common/safe_browsing/binary_feature_extractor_unittest.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_unittest.cc
diff --git a/chrome/common/safe_browsing/binary_feature_extractor_unittest.cc b/chrome/common/safe_browsing/binary_feature_extractor_unittest.cc
index ca3075869c74d75ddb5344caa70fa01d34266959..1a1cf28df1f8481387330e280fc0de0d80420d44 100644
--- a/chrome/common/safe_browsing/binary_feature_extractor_unittest.cc
+++ b/chrome/common/safe_browsing/binary_feature_extractor_unittest.cc
@@ -7,10 +7,11 @@
#include <stdint.h>
#include <string.h>
+#include <memory>
+
#include "base/base_paths.h"
#include "base/files/file.h"
#include "base/files/scoped_temp_dir.h"
-#include "base/memory/scoped_ptr.h"
#include "base/path_service.h"
#include "chrome/common/safe_browsing/csd.pb.h"
#include "crypto/sha2.h"
@@ -82,7 +83,7 @@ TEST_F(BinaryFeatureExtractorTest, ExtractOneBlockDigest) {
0x82, 0x20, 0xe3, 0x93, 0x4c, 0x65, 0xe0, 0xc1, 0xc0, 0x19};
const int kDataLen = kBlockSize;
- scoped_ptr<char[]> data(new char[kDataLen]);
+ std::unique_ptr<char[]> data(new char[kDataLen]);
memset(data.get(), 71, kDataLen);
WriteFileToHash(data.get(), kDataLen);
ExpectFileDigestEq(kDigest);
@@ -96,7 +97,7 @@ TEST_F(BinaryFeatureExtractorTest, ExtractBigBlockDigest) {
0x33, 0xa7, 0x70, 0xf3, 0x6b, 0x85, 0xbf, 0xce, 0x9d, 0x5c};
const int kDataLen = kBlockSize + 1;
- scoped_ptr<char[]> data(new char[kDataLen]);
+ std::unique_ptr<char[]> data(new char[kDataLen]);
memset(data.get(), 71, kDataLen);
WriteFileToHash(data.get(), kDataLen);
ExpectFileDigestEq(kDigest);
« no previous file with comments | « chrome/common/safe_browsing/binary_feature_extractor.cc ('k') | chrome/common/safe_browsing/mach_o_image_reader_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698