Chromium Code Reviews| Index: content/browser/indexed_db/indexed_db_factory_impl.cc |
| diff --git a/content/browser/indexed_db/indexed_db_factory_impl.cc b/content/browser/indexed_db/indexed_db_factory_impl.cc |
| index f818f3f6181f7adff689abe7ec8308c47d497cfd..039cbddfbbf121826def25edb702623d1b52e4bc 100644 |
| --- a/content/browser/indexed_db/indexed_db_factory_impl.cc |
| +++ b/content/browser/indexed_db/indexed_db_factory_impl.cc |
| @@ -257,6 +257,26 @@ void IndexedDBFactoryImpl::DeleteDatabase( |
| return; |
| } |
| + std::vector<base::string16> names = backing_store->GetDatabaseNames(&s); |
| + if (!s.ok()) { |
| + DLOG(ERROR) << "Internal error getting database names"; |
| + IndexedDBDatabaseError error(blink::WebIDBDatabaseExceptionUnknownError, |
| + "Internal error opening backing store for " |
|
cmumford
2015/04/16 17:22:47
Error string incorrect (copied from above).
jsbell
2015/04/22 21:30:07
As cmumford noted, his comment was a misunderstand
|
| + "indexedDB.deleteDatabase."); |
| + callbacks->OnError(error); |
| + backing_store = NULL; |
| + if (s.IsCorruption()) |
| + HandleBackingStoreCorruption(origin_url, error); |
| + return; |
| + } |
| + if (!ContainsValue(names, name)) { |
| + const int64 version = 0; |
| + callbacks->OnSuccess(version); |
| + backing_store = NULL; |
| + ReleaseBackingStore(origin_url, false /* immediate */); |
| + return; |
| + } |
| + |
| scoped_refptr<IndexedDBDatabase> database = IndexedDBDatabase::Create( |
| name, backing_store.get(), this, unique_identifier, &s); |
| if (!database.get()) { |