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

Unified Diff: chrome/browser/android/history_report/delta_file_backend_leveldb.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: chrome/browser/android/history_report/delta_file_backend_leveldb.cc
diff --git a/chrome/browser/android/history_report/delta_file_backend_leveldb.cc b/chrome/browser/android/history_report/delta_file_backend_leveldb.cc
index 1ded0791c45f9aea74dd393fd96963e4415f9a48..88d4ddfd83260bf96dbca68e00194d6fea9c468e 100644
--- a/chrome/browser/android/history_report/delta_file_backend_leveldb.cc
+++ b/chrome/browser/android/history_report/delta_file_backend_leveldb.cc
@@ -12,6 +12,7 @@
#include "base/strings/string_number_conversions.h"
#include "base/strings/stringprintf.h"
#include "chrome/browser/android/history_report/delta_file_commons.h"
+#include "third_party/leveldatabase/env_chromium.h"
#include "third_party/leveldatabase/src/include/leveldb/comparator.h"
#include "third_party/leveldatabase/src/include/leveldb/db.h"
#include "third_party/leveldatabase/src/include/leveldb/iterator.h"
@@ -96,11 +97,11 @@ bool DeltaFileBackend::Init() {
options.comparator = leveldb_cmp_.get();
std::string path = path_.value();
leveldb::DB* db = NULL;
- leveldb::Status status = leveldb::DB::Open(options, path, &db);
+ leveldb::Status status = leveldb_env::DBRegistry::Open(options, path, &db);
if (status.IsCorruption()) {
LOG(WARNING) << "Deleting possibly-corrupt database";
base::DeleteFile(path_, true);
- status = leveldb::DB::Open(options, path, &db);
+ status = leveldb_env::DBRegistry::Open(options, path, &db);
}
if (status.ok()) {
CHECK(db);

Powered by Google App Engine
This is Rietveld 408576698