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

Unified Diff: content/browser/leveldb_wrapper_impl.cc

Issue 2607493003: Store a version number in the localstorage database. (Closed)
Patch Set: Created 4 years 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 | « content/browser/dom_storage/local_storage_context_mojo_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/leveldb_wrapper_impl.cc
diff --git a/content/browser/leveldb_wrapper_impl.cc b/content/browser/leveldb_wrapper_impl.cc
index e60426a297fa6f871d30c52e840411eca33c9ffa..69cf6ceb53eca8f6f6943b18738e57d4abeecbb9 100644
--- a/content/browser/leveldb_wrapper_impl.cc
+++ b/content/browser/leveldb_wrapper_impl.cc
@@ -243,6 +243,12 @@ void LevelDBWrapperImpl::LoadMap(const base::Closure& completion_callback) {
if (on_load_complete_tasks_.size() > 1)
return;
+ if (!database_) {
+ OnLoadComplete(leveldb::mojom::DatabaseError::IO_ERROR,
+ std::vector<leveldb::mojom::KeyValuePtr>());
+ return;
+ }
+
// TODO(michaeln): Import from sqlite localstorage db.
database_->GetPrefixed(prefix_,
base::Bind(&LevelDBWrapperImpl::OnLoadComplete,
« no previous file with comments | « content/browser/dom_storage/local_storage_context_mojo_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698