Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "webkit/appcache/appcache_storage_impl.h" | 5 #include "webkit/appcache/appcache_storage_impl.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <functional> | 8 #include <functional> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 1168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1179 } | 1179 } |
| 1180 | 1180 |
| 1181 AppCacheStorageImpl::~AppCacheStorageImpl() { | 1181 AppCacheStorageImpl::~AppCacheStorageImpl() { |
| 1182 std::for_each(pending_quota_queries_.begin(), | 1182 std::for_each(pending_quota_queries_.begin(), |
| 1183 pending_quota_queries_.end(), | 1183 pending_quota_queries_.end(), |
| 1184 std::mem_fun(&DatabaseTask::CancelCompletion)); | 1184 std::mem_fun(&DatabaseTask::CancelCompletion)); |
| 1185 std::for_each(scheduled_database_tasks_.begin(), | 1185 std::for_each(scheduled_database_tasks_.begin(), |
| 1186 scheduled_database_tasks_.end(), | 1186 scheduled_database_tasks_.end(), |
| 1187 std::mem_fun(&DatabaseTask::CancelCompletion)); | 1187 std::mem_fun(&DatabaseTask::CancelCompletion)); |
| 1188 | 1188 |
| 1189 if (database_) { | 1189 if (database_ && !service()->save_session_state()) { |
|
michaeln
2011/12/07 20:49:15
Since CleanUpOnDatabaseThread is also responsible
marja
2011/12/08 08:30:12
Done.
| |
| 1190 db_thread_->PostTask( | 1190 db_thread_->PostTask( |
| 1191 FROM_HERE, | 1191 FROM_HERE, |
| 1192 base::Bind(&CleanUpOnDatabaseThread, database_, | 1192 base::Bind(&CleanUpOnDatabaseThread, database_, |
| 1193 make_scoped_refptr(service_->special_storage_policy()), | 1193 make_scoped_refptr(service_->special_storage_policy()), |
| 1194 service()->clear_local_state_on_exit())); | 1194 service()->clear_local_state_on_exit())); |
| 1195 } | 1195 } |
| 1196 } | 1196 } |
| 1197 | 1197 |
| 1198 void AppCacheStorageImpl::Initialize(const FilePath& cache_directory, | 1198 void AppCacheStorageImpl::Initialize(const FilePath& cache_directory, |
| 1199 base::MessageLoopProxy* db_thread, | 1199 base::MessageLoopProxy* db_thread, |
| (...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1671 Disable(); | 1671 Disable(); |
| 1672 if (!is_incognito_) { | 1672 if (!is_incognito_) { |
| 1673 VLOG(1) << "Deleting existing appcache data and starting over."; | 1673 VLOG(1) << "Deleting existing appcache data and starting over."; |
| 1674 db_thread_->PostTask( | 1674 db_thread_->PostTask( |
| 1675 FROM_HERE, base::Bind(&DeleteDirectory, cache_directory_)); | 1675 FROM_HERE, base::Bind(&DeleteDirectory, cache_directory_)); |
| 1676 } | 1676 } |
| 1677 } | 1677 } |
| 1678 } | 1678 } |
| 1679 | 1679 |
| 1680 } // namespace appcache | 1680 } // namespace appcache |
| OLD | NEW |