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..ef17eac73f87a875162b52c9c8da0772e962ddaa 100644 |
| --- a/content/browser/indexed_db/indexed_db_factory_impl.cc |
| +++ b/content/browser/indexed_db/indexed_db_factory_impl.cc |
| @@ -257,6 +257,28 @@ 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 " |
| + "indexedDB.webkitGetDatabaseNames."); |
| + callbacks->OnError(error); |
| + backing_store = NULL; |
| + if (s.IsCorruption()) |
| + HandleBackingStoreCorruption(origin_url, error); |
| + return; |
| + } |
| + std::vector<base::string16>::iterator findItr = |
| + std::find(names.begin(), names.end(), name); |
| + if(findItr == names.end()) |
|
cmumford
2015/04/10 14:58:15
You aren't using findIter so just use:
if (std::f
|
| + { |
| + backing_store = NULL; |
| + ReleaseBackingStore(origin_url, false /* immediate */); |
| + callbacks->OnSuccess(); |
| + return; |
| + } |
| + |
| scoped_refptr<IndexedDBDatabase> database = IndexedDBDatabase::Create( |
| name, backing_store.get(), this, unique_identifier, &s); |
| if (!database.get()) { |