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

Unified Diff: components/leveldb_proto/leveldb_database.cc

Issue 2855953002: leveldb: Add DBTracker for exposing databases to Chrome's memory-infra. (Closed)
Patch Set: Created 3 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: components/leveldb_proto/leveldb_database.cc
diff --git a/components/leveldb_proto/leveldb_database.cc b/components/leveldb_proto/leveldb_database.cc
index 9791c19d5ad9e8f3e124e2c263f52c958bf49057..d7aeb7ac20252bf20f4bcabf42cdf7407aaf6774 100644
--- a/components/leveldb_proto/leveldb_database.cc
+++ b/components/leveldb_proto/leveldb_database.cc
@@ -62,12 +62,12 @@ bool LevelDB::InitWithOptions(const base::FilePath& database_dir,
std::string path = database_dir.AsUTF8Unsafe();
leveldb::DB* db = NULL;
- leveldb::Status status = leveldb::DB::Open(options, path, &db);
+ leveldb::Status status = leveldb_env::DBRegistry::Open(options, path, &db);
if (open_histogram_)
open_histogram_->Add(leveldb_env::GetLevelDBStatusUMAValue(status));
if (status.IsCorruption()) {
base::DeleteFile(database_dir, true);
- status = leveldb::DB::Open(options, path, &db);
+ status = leveldb_env::DBRegistry::Open(options, path, &db);
}
if (status.ok()) {

Powered by Google App Engine
This is Rietveld 408576698