| Index: webkit/database/database_tracker.cc
|
| diff --git a/webkit/database/database_tracker.cc b/webkit/database/database_tracker.cc
|
| index 68899deed6fc088e2529d6c759cd5c7971e0536b..03abf6c6ecc1e4948702a4e5ba5f089ee3a267d7 100644
|
| --- a/webkit/database/database_tracker.cc
|
| +++ b/webkit/database/database_tracker.cc
|
| @@ -98,7 +98,6 @@ DatabaseTracker::DatabaseTracker(
|
| base::MessageLoopProxy* db_tracker_thread)
|
| : is_initialized_(false),
|
| is_incognito_(is_incognito),
|
| - clear_local_state_on_exit_(false),
|
| save_session_state_(false),
|
| shutting_down_(false),
|
| profile_path_(profile_path),
|
| @@ -810,7 +809,7 @@ void DatabaseTracker::DeleteIncognitoDBDirectory() {
|
| file_util::Delete(incognito_db_dir, true);
|
| }
|
|
|
| -void DatabaseTracker::ClearLocalState(bool clear_all_databases) {
|
| +void DatabaseTracker::ClearLocalState() {
|
| shutting_down_ = true;
|
|
|
| bool has_session_only_databases =
|
| @@ -818,7 +817,7 @@ void DatabaseTracker::ClearLocalState(bool clear_all_databases) {
|
| special_storage_policy_->HasSessionOnlyOrigins();
|
|
|
| // Clearing only session-only databases, and there are none.
|
| - if (!clear_all_databases && !has_session_only_databases)
|
| + if (!has_session_only_databases)
|
| return;
|
|
|
| if (!LazyInit())
|
| @@ -831,10 +830,8 @@ void DatabaseTracker::ClearLocalState(bool clear_all_databases) {
|
| origin != origin_identifiers.end(); ++origin) {
|
| GURL origin_url =
|
| webkit_database::DatabaseUtil::GetOriginFromIdentifier(*origin);
|
| - if (!clear_all_databases &&
|
| - !special_storage_policy_->IsStorageSessionOnly(origin_url)) {
|
| + if (!special_storage_policy_->IsStorageSessionOnly(origin_url))
|
| continue;
|
| - }
|
| if (special_storage_policy_.get() &&
|
| special_storage_policy_->IsStorageProtected(origin_url)) {
|
| continue;
|
| @@ -870,23 +867,7 @@ void DatabaseTracker::Shutdown() {
|
| if (is_incognito_)
|
| DeleteIncognitoDBDirectory();
|
| else if (!save_session_state_)
|
| - ClearLocalState(clear_local_state_on_exit_);
|
| -}
|
| -
|
| -void DatabaseTracker::SetClearLocalStateOnExit(bool clear_local_state_on_exit) {
|
| - DCHECK(db_tracker_thread_.get());
|
| - if (!db_tracker_thread_->BelongsToCurrentThread()) {
|
| - db_tracker_thread_->PostTask(
|
| - FROM_HERE,
|
| - base::Bind(&DatabaseTracker::SetClearLocalStateOnExit, this,
|
| - clear_local_state_on_exit));
|
| - return;
|
| - }
|
| - if (shutting_down_) {
|
| - NOTREACHED();
|
| - return;
|
| - }
|
| - clear_local_state_on_exit_ = clear_local_state_on_exit;
|
| + ClearLocalState();
|
| }
|
|
|
| void DatabaseTracker::SaveSessionState() {
|
|
|