Chromium Code Reviews| Index: content/browser/in_process_webkit/indexed_db_context_impl.cc |
| diff --git a/content/browser/in_process_webkit/indexed_db_context_impl.cc b/content/browser/in_process_webkit/indexed_db_context_impl.cc |
| index 2c1e3387576d72d0ec1ac7df7ee642678d47154b..f21637e62678d25c0fc0d7a38f0b16fbec3b7e1b 100644 |
| --- a/content/browser/in_process_webkit/indexed_db_context_impl.cc |
| +++ b/content/browser/in_process_webkit/indexed_db_context_impl.cc |
| @@ -61,11 +61,9 @@ void GetAllOriginsAndPaths( |
| } |
| } |
| -// If clear_all_databases is true, deletes all databases not protected by |
| -// special storage policy. Otherwise deletes session-only databases. |
| +// Deletes session-only databases. |
| void ClearLocalState( |
|
michaeln
2012/06/01 02:06:17
ditto, name is odd now
|
| const FilePath& indexeddb_path, |
| - bool clear_all_databases, |
| scoped_refptr<quota::SpecialStoragePolicy> special_storage_policy) { |
| DCHECK(BrowserThread::CurrentlyOn(BrowserThread::WEBKIT_DEPRECATED)); |
| std::vector<GURL> origins; |
| @@ -75,10 +73,8 @@ void ClearLocalState( |
| std::vector<FilePath>::const_iterator file_path_iter = file_paths.begin(); |
| for (std::vector<GURL>::const_iterator iter = origins.begin(); |
| iter != origins.end(); ++iter, ++file_path_iter) { |
| - if (!clear_all_databases && |
| - !special_storage_policy->IsStorageSessionOnly(*iter)) { |
| + if (!special_storage_policy->IsStorageSessionOnly(*iter)) |
| continue; |
| - } |
| if (special_storage_policy.get() && |
| special_storage_policy->IsStorageProtected(*iter)) |
| continue; |
| @@ -93,8 +89,7 @@ IndexedDBContextImpl::IndexedDBContextImpl( |
| quota::SpecialStoragePolicy* special_storage_policy, |
| quota::QuotaManagerProxy* quota_manager_proxy, |
| base::MessageLoopProxy* webkit_thread_loop) |
| - : clear_local_state_on_exit_(false), |
| - save_session_state_(false), |
| + : save_session_state_(false), |
| special_storage_policy_(special_storage_policy), |
| quota_manager_proxy_(quota_manager_proxy) { |
| if (!data_path.empty()) |
| @@ -245,15 +240,14 @@ IndexedDBContextImpl::~IndexedDBContextImpl() { |
| special_storage_policy_->HasSessionOnlyOrigins(); |
| // Clearning only session-only databases, and there are none. |
| - if (!clear_local_state_on_exit_ && !has_session_only_databases) |
| + if (!has_session_only_databases) |
| return; |
| // No WEBKIT thread here means we are running in a unit test where no clean |
| // up is needed. |
| BrowserThread::PostTask( |
| BrowserThread::WEBKIT_DEPRECATED, FROM_HERE, |
| - base::Bind(&ClearLocalState, data_path_, clear_local_state_on_exit_, |
| - special_storage_policy_)); |
| + base::Bind(&ClearLocalState, data_path_, special_storage_policy_)); |
| } |
| FilePath IndexedDBContextImpl::GetIndexedDBFilePath( |