diff options
author | marja@chromium.org <marja@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-04 11:56:17 +0000 |
---|---|---|
committer | marja@chromium.org <marja@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-04 11:56:17 +0000 |
commit | 43b368fd8d04ed15a198f976a212003555721aca (patch) | |
tree | 27d496ea2ca5f4fb120e24ce6e356185c2ff7788 /webkit | |
parent | b695df63221af283bfabd7dc49fd04141875fb79 (diff) | |
download | chromium_src-43b368fd8d04ed15a198f976a212003555721aca.zip chromium_src-43b368fd8d04ed15a198f976a212003555721aca.tar.gz chromium_src-43b368fd8d04ed15a198f976a212003555721aca.tar.bz2 |
Debug prints for a failing test (ContinueWhereILeftOffTest.LocalStorageClearedOnExit).
To be reverted immediately once a test run has started.
BUG=153260
Review URL: https://codereview.chromium.org/11434037
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@170932 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r-- | webkit/dom_storage/dom_storage_context.cc | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/webkit/dom_storage/dom_storage_context.cc b/webkit/dom_storage/dom_storage_context.cc index 6a67e8a..feba694 100644 --- a/webkit/dom_storage/dom_storage_context.cc +++ b/webkit/dom_storage/dom_storage_context.cc @@ -170,24 +170,30 @@ void DomStorageContext::PurgeMemory() { } void DomStorageContext::Shutdown() { + LOG(ERROR) << "DomStorageContext::Shutdown"; is_shutdown_ = true; StorageNamespaceMap::const_iterator it = namespaces_.begin(); for (; it != namespaces_.end(); ++it) it->second->Shutdown(); - if (localstorage_directory_.empty() && !session_storage_database_.get()) + if (localstorage_directory_.empty() && !session_storage_database_.get()) { + LOG(ERROR) << "No databases"; return; + } // Respect the content policy settings about what to // keep and what to discard. - if (force_keep_session_state_) + if (force_keep_session_state_) { + LOG(ERROR) << "Saving the session state"; return; // Keep everything. + } bool has_session_only_origins = special_storage_policy_.get() && special_storage_policy_->HasSessionOnlyOrigins(); if (has_session_only_origins) { + LOG(ERROR) << "There is session only data to clear"; // We may have to delete something. We continue on the // commit sequence after area shutdown tasks have cycled // thru that sequence (and closed their database files). @@ -306,11 +312,17 @@ void DomStorageContext::ClearSessionOnlyOrigins() { GetLocalStorageUsage(&infos, kDontIncludeFileInfo); for (size_t i = 0; i < infos.size(); ++i) { const GURL& origin = infos[i].origin; - if (special_storage_policy_->IsStorageProtected(origin)) + LOG(ERROR) << "Data for origin " << origin; + if (special_storage_policy_->IsStorageProtected(origin)) { + LOG(ERROR) << "Was protected"; continue; - if (!special_storage_policy_->IsStorageSessionOnly(origin)) + } + if (!special_storage_policy_->IsStorageSessionOnly(origin)) { + LOG(ERROR) << "Not session only"; continue; + } + LOG(ERROR) << "Clearing it"; const bool kNotRecursive = false; FilePath database_file_path = localstorage_directory_.Append( DomStorageArea::DatabaseFileNameFromOrigin(origin)); |