Index: webkit/dom_storage/dom_storage_area.cc |
diff --git a/webkit/dom_storage/dom_storage_area.cc b/webkit/dom_storage/dom_storage_area.cc |
index 93946b8900fd0f74d9cf2ddb30aa133841251403..72120c6651445af5bcc2a0ad4f5416dee342a5e1 100644 |
--- a/webkit/dom_storage/dom_storage_area.cc |
+++ b/webkit/dom_storage/dom_storage_area.cc |
@@ -63,7 +63,7 @@ DomStorageArea::DomStorageArea( |
is_shutdown_(false) { |
if (namespace_id == kLocalStorageNamespaceId && !directory.empty()) { |
FilePath path = directory.Append(DatabaseFileNameFromOrigin(origin_)); |
- backing_.reset(new DomStorageDatabase(path)); |
+ backing_.reset(new LocalStorageDatabase(path)); |
is_initial_import_done_ = false; |
} |
} |
@@ -168,13 +168,14 @@ void DomStorageArea::DeleteOrigin() { |
Clear(); |
return; |
} |
+ // FIXME(marja): session storage here... |
map_ = new DomStorageMap(kPerAreaQuota); |
if (backing_.get()) { |
is_initial_import_done_ = false; |
- backing_.reset(new DomStorageDatabase(backing_->file_path())); |
+ backing_.reset(new LocalStorageDatabase(backing_->file_path())); |
file_util::Delete(backing_->file_path(), false); |
file_util::Delete( |
- DomStorageDatabase::GetJournalFilePath(backing_->file_path()), false); |
+ LocalStorageDatabase::GetJournalFilePath(backing_->file_path()), false); |
} |
} |
@@ -191,7 +192,7 @@ void DomStorageArea::PurgeMemory() { |
// Recreate the database object, this frees up the open sqlite connection |
// and its page cache. |
- backing_.reset(new DomStorageDatabase(backing_->file_path())); |
+ backing_.reset(new LocalStorageDatabase(backing_->file_path())); |
} |
void DomStorageArea::Shutdown() { |
@@ -216,7 +217,7 @@ void DomStorageArea::InitialImportIfNeeded() { |
DCHECK(backing_.get()); |
ValuesMap initial_values; |
- backing_->ReadAllValues(&initial_values); |
+ backing_->ReadAllValues(namespace_id_, origin_, &initial_values); |
map_->SwapValues(&initial_values); |
is_initial_import_done_ = true; |
} |
@@ -262,6 +263,7 @@ void DomStorageArea::CommitChanges() { |
// This method executes on the commit sequence. |
DCHECK(in_flight_commit_batch_.get()); |
bool success = backing_->CommitChanges( |
+ namespace_id_, origin_, |
in_flight_commit_batch_->clear_all_first, |
in_flight_commit_batch_->changed_values); |
DCHECK(success); // TODO(michaeln): what if it fails? |
@@ -290,6 +292,7 @@ void DomStorageArea::ShutdownInCommitSequence() { |
if (commit_batch_.get()) { |
// Commit any changes that accrued prior to the timer firing. |
bool success = backing_->CommitChanges( |
+ namespace_id_, origin_, |
commit_batch_->clear_all_first, |
commit_batch_->changed_values); |
DCHECK(success); |