| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/browser/storage_partition_impl.h" | 5 #include "content/browser/storage_partition_impl.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <set> | 9 #include <set> |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "base/bind.h" | 12 #include "base/bind.h" |
| 13 #include "base/command_line.h" | 13 #include "base/command_line.h" |
| 14 #include "base/location.h" | 14 #include "base/location.h" |
| 15 #include "base/sequenced_task_runner.h" | 15 #include "base/sequenced_task_runner.h" |
| 16 #include "base/single_thread_task_runner.h" | 16 #include "base/single_thread_task_runner.h" |
| 17 #include "base/strings/utf_string_conversions.h" | 17 #include "base/strings/utf_string_conversions.h" |
| 18 #include "content/browser/blob_storage/chrome_blob_storage_context.h" | 18 #include "content/browser/blob_storage/chrome_blob_storage_context.h" |
| 19 #include "content/browser/browser_main_loop.h" | 19 #include "content/browser/browser_main_loop.h" |
| 20 #include "content/browser/browsing_data/storage_partition_http_cache_data_remove
r.h" | 20 #include "content/browser/browsing_data/storage_partition_http_cache_data_remove
r.h" |
| 21 #include "content/browser/fileapi/browser_file_system_helper.h" | 21 #include "content/browser/fileapi/browser_file_system_helper.h" |
| 22 #include "content/browser/gpu/shader_cache_factory.h" | 22 #include "content/browser/gpu/shader_cache_factory.h" |
| 23 #include "content/browser/notifications/platform_notification_context_impl.h" | 23 #include "content/browser/notifications/platform_notification_context_impl.h" |
| 24 #include "content/browser/renderer_host/render_process_host_impl.h" |
| 24 #include "content/common/dom_storage/dom_storage_types.h" | 25 #include "content/common/dom_storage/dom_storage_types.h" |
| 25 #include "content/public/browser/browser_context.h" | 26 #include "content/public/browser/browser_context.h" |
| 26 #include "content/public/browser/browser_thread.h" | 27 #include "content/public/browser/browser_thread.h" |
| 27 #include "content/public/browser/content_browser_client.h" | 28 #include "content/public/browser/content_browser_client.h" |
| 28 #include "content/public/browser/dom_storage_context.h" | 29 #include "content/public/browser/dom_storage_context.h" |
| 29 #include "content/public/browser/indexed_db_context.h" | 30 #include "content/public/browser/indexed_db_context.h" |
| 30 #include "content/public/browser/local_storage_usage_info.h" | 31 #include "content/public/browser/local_storage_usage_info.h" |
| 31 #include "content/public/browser/session_storage_usage_info.h" | 32 #include "content/public/browser/session_storage_usage_info.h" |
| 32 #include "content/public/common/content_client.h" | 33 #include "content/public/common/content_client.h" |
| 33 #include "content/public/common/content_switches.h" | 34 #include "content/public/common/content_switches.h" |
| (...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 393 | 394 |
| 394 // These message loop checks are just to avoid leaks in unittests. | 395 // These message loop checks are just to avoid leaks in unittests. |
| 395 if (GetDatabaseTracker() && | 396 if (GetDatabaseTracker() && |
| 396 BrowserThread::IsMessageLoopValid(BrowserThread::FILE)) { | 397 BrowserThread::IsMessageLoopValid(BrowserThread::FILE)) { |
| 397 BrowserThread::PostTask( | 398 BrowserThread::PostTask( |
| 398 BrowserThread::FILE, | 399 BrowserThread::FILE, |
| 399 FROM_HERE, | 400 FROM_HERE, |
| 400 base::Bind(&storage::DatabaseTracker::Shutdown, GetDatabaseTracker())); | 401 base::Bind(&storage::DatabaseTracker::Shutdown, GetDatabaseTracker())); |
| 401 } | 402 } |
| 402 | 403 |
| 404 RenderProcessHostImpl::OnStorageParitionShutdown(this); |
| 405 |
| 403 if (GetFileSystemContext()) | 406 if (GetFileSystemContext()) |
| 404 GetFileSystemContext()->Shutdown(); | 407 GetFileSystemContext()->Shutdown(); |
| 405 | 408 |
| 406 if (GetDOMStorageContext()) | 409 if (GetDOMStorageContext()) |
| 407 GetDOMStorageContext()->Shutdown(); | 410 GetDOMStorageContext()->Shutdown(); |
| 408 | 411 |
| 409 if (GetServiceWorkerContext()) | 412 if (GetServiceWorkerContext()) |
| 410 GetServiceWorkerContext()->Shutdown(); | 413 GetServiceWorkerContext()->Shutdown(); |
| 411 | 414 |
| 412 if (GetCacheStorageContext()) | 415 if (GetCacheStorageContext()) |
| (...skipping 568 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 981 media_url_request_context_ = media_url_request_context; | 984 media_url_request_context_ = media_url_request_context; |
| 982 } | 985 } |
| 983 | 986 |
| 984 void StoragePartitionImpl::GetQuotaSettings( | 987 void StoragePartitionImpl::GetQuotaSettings( |
| 985 const storage::OptionalQuotaSettingsCallback& callback) { | 988 const storage::OptionalQuotaSettingsCallback& callback) { |
| 986 GetContentClient()->browser()->GetQuotaSettings(browser_context_, this, | 989 GetContentClient()->browser()->GetQuotaSettings(browser_context_, this, |
| 987 callback); | 990 callback); |
| 988 } | 991 } |
| 989 | 992 |
| 990 } // namespace content | 993 } // namespace content |
| OLD | NEW |