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

Unified Diff: content/browser/dom_storage/local_storage_context_mojo_unittest.cc

Issue 2953473002: Use leveldb_env::OpenDB() to open leveldb databases. (Closed)
Patch Set: Rebase; add comments to CHECK() Created 3 years, 5 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: content/browser/dom_storage/local_storage_context_mojo_unittest.cc
diff --git a/content/browser/dom_storage/local_storage_context_mojo_unittest.cc b/content/browser/dom_storage/local_storage_context_mojo_unittest.cc
index 16720977054e683628c8f494dafbd80a6deacafd..9bd47a333555f3dbae1f0ee2588d16e7e8828ffc 100644
--- a/content/browser/dom_storage/local_storage_context_mojo_unittest.cc
+++ b/content/browser/dom_storage/local_storage_context_mojo_unittest.cc
@@ -976,13 +976,12 @@ TEST_F(LocalStorageContextMojoTestWithService, InvalidVersionOnDisk) {
{
// Mess up version number in database.
leveldb_env::ChromiumEnv env;
- leveldb::DB* db = nullptr;
+ std::unique_ptr<leveldb::DB> db;
leveldb::Options options;
options.env = &env;
base::FilePath db_path =
temp_path().Append(test_path).Append(FILE_PATH_LITERAL("leveldb"));
- ASSERT_TRUE(leveldb::DB::Open(options, db_path.AsUTF8Unsafe(), &db).ok());
- std::unique_ptr<leveldb::DB> db_owner(db);
+ ASSERT_TRUE(leveldb_env::OpenDB(options, db_path.AsUTF8Unsafe(), &db).ok());
ASSERT_TRUE(db->Put(leveldb::WriteOptions(), "VERSION", "argh").ok());
}
« no previous file with comments | « components/sync/model_impl/model_type_store_backend.cc ('k') | content/browser/dom_storage/session_storage_database.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698