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

Unified Diff: chrome/browser/sync_file_system/drive_backend/metadata_db_migration_util_unittest.cc

Issue 1873683002: Convert //chrome/browser/sync_file_system from scoped_ptr 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/browser/sync_file_system/drive_backend/metadata_db_migration_util_unittest.cc
diff --git a/chrome/browser/sync_file_system/drive_backend/metadata_db_migration_util_unittest.cc b/chrome/browser/sync_file_system/drive_backend/metadata_db_migration_util_unittest.cc
index da6eb5e080dd64b47bbc789e10f216687da6db31..b8f59e14c0b27dc33fab51ba2ffd8953b86248ce 100644
--- a/chrome/browser/sync_file_system/drive_backend/metadata_db_migration_util_unittest.cc
+++ b/chrome/browser/sync_file_system/drive_backend/metadata_db_migration_util_unittest.cc
@@ -4,10 +4,10 @@
#include "chrome/browser/sync_file_system/drive_backend/metadata_db_migration_util.h"
+#include <memory>
#include <string>
#include "base/files/scoped_temp_dir.h"
-#include "base/memory/scoped_ptr.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
#include "chrome/browser/sync_file_system/drive_backend/drive_backend_constants.h"
@@ -29,7 +29,8 @@ namespace {
void VerifyKeyAndValue(const std::string& key,
const std::string& expect_val,
leveldb::DB* db) {
- scoped_ptr<leveldb::Iterator> itr(db->NewIterator(leveldb::ReadOptions()));
+ std::unique_ptr<leveldb::Iterator> itr(
+ db->NewIterator(leveldb::ReadOptions()));
itr->Seek(key);
EXPECT_TRUE(itr->Valid());
@@ -37,7 +38,8 @@ void VerifyKeyAndValue(const std::string& key,
}
void VerifyNotExist(const std::string& key, leveldb::DB* db) {
- scoped_ptr<leveldb::Iterator> itr(db->NewIterator(leveldb::ReadOptions()));
+ std::unique_ptr<leveldb::Iterator> itr(
+ db->NewIterator(leveldb::ReadOptions()));
itr->Seek(key);
EXPECT_TRUE(!itr->Valid() ||
@@ -80,7 +82,7 @@ TEST(DriveMetadataDBMigrationUtilTest, RollbackFromV4ToV3) {
leveldb::Status status = leveldb::DB::Open(options, db_dir, &db_ptr);
ASSERT_TRUE(status.ok());
}
- scoped_ptr<leveldb::DB> db(db_ptr);
+ std::unique_ptr<leveldb::DB> db(db_ptr);
// Setup the database with the schema version 4, without IDs.
leveldb::WriteBatch batch;

Powered by Google App Engine
This is Rietveld 408576698