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

Unified Diff: content/browser/indexed_db/indexed_db_backing_store.cc

Issue 16409006: Don't delete leveldb directory if disk was full. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Don't assume disk is full if reading it failed Created 7 years, 6 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/indexed_db/indexed_db_backing_store.cc
diff --git a/content/browser/indexed_db/indexed_db_backing_store.cc b/content/browser/indexed_db/indexed_db_backing_store.cc
index ccd6bf827fb43b8a2f4dd27f12064371f2286a19..5933fea9cc89accf02be813430e123519bbcecd6 100644
--- a/content/browser/indexed_db/indexed_db_backing_store.cc
+++ b/content/browser/indexed_db/indexed_db_backing_store.cc
@@ -365,8 +365,8 @@ class DefaultLevelDBFactory : public LevelDBFactory {
public:
virtual scoped_ptr<LevelDBDatabase> OpenLevelDB(
const base::FilePath& file_name,
- const LevelDBComparator* comparator) OVERRIDE {
- return LevelDBDatabase::Open(file_name, comparator);
+ const LevelDBComparator* comparator, bool* is_disk_full) OVERRIDE {
+ return LevelDBDatabase::Open(file_name, comparator, is_disk_full);
}
virtual bool DestroyLevelDB(const base::FilePath& file_name) OVERRIDE {
return LevelDBDatabase::Destroy(file_name);
@@ -499,7 +499,8 @@ scoped_refptr<IndexedDBBackingStore> IndexedDBBackingStore::Open(
base::FilePath file_path = path_base.Append(identifier_path);
- db = leveldb_factory->OpenLevelDB(file_path, comparator.get());
+ bool is_disk_full = false;
jsbell 2013/06/07 17:48:41 This isn't used. In the Blink patch we assert, log
dgrogan 2013/06/07 18:23:58 Thanks for catching this. I decided the blink beha
+ db = leveldb_factory->OpenLevelDB(file_path, comparator.get(), &is_disk_full);
if (db) {
bool known = false;

Powered by Google App Engine
This is Rietveld 408576698