Chromium Code Reviews| Index: content/browser/in_process_webkit/indexed_db_context.cc |
| diff --git a/content/browser/in_process_webkit/indexed_db_context.cc b/content/browser/in_process_webkit/indexed_db_context.cc |
| index 8e091c1678572dca7c3192b74addfff3e3a338cf..95a337a2e3cf5e6cc0de5a6fdada655ad579ad0e 100644 |
| --- a/content/browser/in_process_webkit/indexed_db_context.cc |
| +++ b/content/browser/in_process_webkit/indexed_db_context.cc |
| @@ -103,7 +103,7 @@ FilePath IndexedDBContext::GetIndexedDBFilePath( |
| void IndexedDBContext::DeleteIndexedDBFile(const FilePath& file_path) { |
| DCHECK(BrowserThread::CurrentlyOn(BrowserThread::WEBKIT)); |
| // TODO(pastarmovj): Close all database connections that use that file. |
|
michaeln
2011/07/27 01:31:35
I see there is a close() method on WebIDBDatabase
dgrogan
2011/07/27 22:56:01
Yes, that's how they will be closed, but more work
|
| - file_util::Delete(file_path, false); |
| + file_util::Delete(file_path, true /*recursive*/); |
| } |
| void IndexedDBContext::DeleteIndexedDBForOrigin(const string16& origin_id) { |
| @@ -115,6 +115,14 @@ void IndexedDBContext::DeleteIndexedDBForOrigin(const string16& origin_id) { |
| DeleteIndexedDBFile(GetIndexedDBFilePath(origin_id)); |
| } |
| +// TODO(dgrogan): Once we can delete IndexedDB directories out from underneath |
| +// open webkit instances, merge this and DeleteIndexedDBForOrigin. |
| +void IndexedDBContext::EvictOrigin(const string16& origin_id) { |
|
michaeln
2011/07/27 01:31:35
This and the method above are functionally equival
dgrogan
2011/07/29 18:14:04
Correct.
|
| + DCHECK(BrowserThread::CurrentlyOn(BrowserThread::WEBKIT)); |
| + FilePath idb_directory = GetIndexedDBFilePath(origin_id); |
| + DeleteIndexedDBFile(idb_directory); |
| +} |
| + |
| bool IndexedDBContext::IsUnlimitedStorageGranted( |
| const GURL& origin) const { |
| return special_storage_policy_->IsStorageUnlimited(origin); |