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

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

Issue 1071553002: Optimizes the operation of DeleteDatabase when no backing store exists. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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
« no previous file with comments | « no previous file | content/browser/indexed_db/indexed_db_factory_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..c59e611b39deceb211c16970ab6040a540de4ee5 100644
--- a/content/browser/indexed_db/indexed_db_factory_impl.cc
+++ b/content/browser/indexed_db/indexed_db_factory_impl.cc
@@ -237,6 +237,12 @@ void IndexedDBFactoryImpl::DeleteDatabase(
std::string data_loss_message;
bool disk_full = false;
leveldb::Status s;
+ IndexedDBBackingStoreMap::iterator it2 = backing_store_map_.find(origin_url);
cmumford 2015/04/08 15:14:35 Just call IsBackingStoreOpen(origin_url)
+ if(it2 == backing_store_map_.end())
cmumford 2015/04/08 15:14:35 spaces, and { are incorrect. Run "git cl format" t
+ {
+ ContextDestroyed();
+ return;
+ }
cmumford 2015/04/08 15:14:35 Why not have this test at the very beginning of th
scoped_refptr<IndexedDBBackingStore> backing_store =
OpenBackingStore(origin_url,
data_directory,
« no previous file with comments | « no previous file | content/browser/indexed_db/indexed_db_factory_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698