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

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

Issue 303073002: Change instances of s.IsCorruption() to leveldb_env::IsCorruption(s) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix memory leak Created 6 years, 7 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_factory.cc
diff --git a/content/browser/indexed_db/indexed_db_factory.cc b/content/browser/indexed_db/indexed_db_factory.cc
index bf6e0b9dfd5bb3272381499e4ea931fd7fbd228e..dccec5f58121164cfd2d91ef1474d3dde01115f5 100644
--- a/content/browser/indexed_db/indexed_db_factory.cc
+++ b/content/browser/indexed_db/indexed_db_factory.cc
@@ -13,6 +13,7 @@
#include "content/browser/indexed_db/indexed_db_tracing.h"
#include "content/browser/indexed_db/indexed_db_transaction_coordinator.h"
#include "third_party/WebKit/public/platform/WebIDBDatabaseException.h"
+#include "third_party/leveldatabase/env_chromium.h"
#include "webkit/common/database/database_identifier.h"
using base::ASCIIToUTF16;
@@ -250,7 +251,7 @@ void IndexedDBFactory::DeleteDatabase(
"Internal error creating database backend for "
"indexedDB.deleteDatabase."));
callbacks->OnError(error);
- if (s.IsCorruption())
+ if (leveldb_env::IsCorruption(s))
HandleBackingStoreCorruption(origin_url, error);
return;
}
@@ -436,7 +437,7 @@ void IndexedDBFactory::Open(const base::string16& name,
"database backend for "
"indexedDB.open."));
connection.callbacks->OnError(error);
- if (s.IsCorruption()) {
+ if (leveldb_env::IsCorruption(s)) {
backing_store = NULL; // Closes the LevelDB so that it can be deleted
HandleBackingStoreCorruption(origin_url, error);
}
« no previous file with comments | « content/browser/indexed_db/indexed_db_database_unittest.cc ('k') | content/browser/indexed_db/indexed_db_fake_backing_store.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698