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..a0cbcaa72d392ad9e451e5389311a80fed1b3cf2 100644 |
| --- a/content/browser/indexed_db/indexed_db_factory_impl.cc |
| +++ b/content/browser/indexed_db/indexed_db_factory_impl.cc |
| @@ -257,6 +257,27 @@ 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."); |
|
jsbell
2015/04/13 16:32:39
This should be "indexedDB.deleteDatabase"
|
| + callbacks->OnError(error); |
| + backing_store = NULL; |
| + if (s.IsCorruption()) |
| + HandleBackingStoreCorruption(origin_url, error); |
| + return; |
| + } |
| + if(std::find(names.begin(), names.end(), name) == names.end()) |
|
jsbell
2015/04/13 16:32:39
#include "base/stl_util.h" and use:
base::Contain
jsbell
2015/04/13 16:32:40
Space between if and (
please use `git cl format`
|
| + { |
|
jsbell
2015/04/13 16:32:40
{ should be on same line as if
please use `git cl
|
| + int64 version = 0; |
|
jsbell
2015/04/13 16:32:40
Make this const
|
| + callbacks->OnSuccess(version); |
| + backing_store = NULL; |
| + ReleaseBackingStore(origin_url, false ); |
|
jsbell
2015/04/13 16:32:39
Please document the use of false here (e.g. /* imm
jsbell
2015/04/13 16:32:39
No space before )
please use `git cl format` befo
|
| + return; |
| + } |
| + |
| scoped_refptr<IndexedDBDatabase> database = IndexedDBDatabase::Create( |
| name, backing_store.get(), this, unique_identifier, &s); |
| if (!database.get()) { |