| 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 "base/sequenced_task_runner.h" | 7 #include "base/sequenced_task_runner.h" |
| 8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
| 9 #include "content/browser/browser_main_loop.h" | 9 #include "content/browser/browser_main_loop.h" |
| 10 #include "content/browser/fileapi/browser_file_system_helper.h" | 10 #include "content/browser/fileapi/browser_file_system_helper.h" |
| (...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 410 GetFileSystemContext()->Shutdown(); | 410 GetFileSystemContext()->Shutdown(); |
| 411 | 411 |
| 412 if (GetDOMStorageContext()) | 412 if (GetDOMStorageContext()) |
| 413 GetDOMStorageContext()->Shutdown(); | 413 GetDOMStorageContext()->Shutdown(); |
| 414 | 414 |
| 415 if (GetServiceWorkerContext()) | 415 if (GetServiceWorkerContext()) |
| 416 GetServiceWorkerContext()->Shutdown(); | 416 GetServiceWorkerContext()->Shutdown(); |
| 417 | 417 |
| 418 if (GetGeofencingManager()) | 418 if (GetGeofencingManager()) |
| 419 GetGeofencingManager()->Shutdown(); | 419 GetGeofencingManager()->Shutdown(); |
| 420 |
| 421 if (GetPlatformNotificationContext()) |
| 422 GetPlatformNotificationContext()->Shutdown(); |
| 420 } | 423 } |
| 421 | 424 |
| 422 StoragePartitionImpl* StoragePartitionImpl::Create( | 425 StoragePartitionImpl* StoragePartitionImpl::Create( |
| 423 BrowserContext* context, | 426 BrowserContext* context, |
| 424 bool in_memory, | 427 bool in_memory, |
| 425 const base::FilePath& partition_path) { | 428 const base::FilePath& partition_path) { |
| 426 // Ensure that these methods are called on the UI thread, except for | 429 // Ensure that these methods are called on the UI thread, except for |
| 427 // unittests where a UI thread might not have been created. | 430 // unittests where a UI thread might not have been created. |
| 428 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI) || | 431 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI) || |
| 429 !BrowserThread::IsMessageLoopValid(BrowserThread::UI)); | 432 !BrowserThread::IsMessageLoopValid(BrowserThread::UI)); |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 493 scoped_refptr<HostZoomLevelContext> host_zoom_level_context( | 496 scoped_refptr<HostZoomLevelContext> host_zoom_level_context( |
| 494 new HostZoomLevelContext( | 497 new HostZoomLevelContext( |
| 495 context->CreateZoomLevelDelegate(partition_path))); | 498 context->CreateZoomLevelDelegate(partition_path))); |
| 496 | 499 |
| 497 scoped_refptr<NavigatorConnectContextImpl> navigator_connect_context = | 500 scoped_refptr<NavigatorConnectContextImpl> navigator_connect_context = |
| 498 new NavigatorConnectContextImpl(); | 501 new NavigatorConnectContextImpl(); |
| 499 navigator_connect_context->AddFactory(make_scoped_ptr( | 502 navigator_connect_context->AddFactory(make_scoped_ptr( |
| 500 new NavigatorConnectServiceWorkerServiceFactory(service_worker_context))); | 503 new NavigatorConnectServiceWorkerServiceFactory(service_worker_context))); |
| 501 | 504 |
| 502 scoped_refptr<PlatformNotificationContextImpl> platform_notification_context = | 505 scoped_refptr<PlatformNotificationContextImpl> platform_notification_context = |
| 503 new PlatformNotificationContextImpl(path); | 506 new PlatformNotificationContextImpl(path, service_worker_context); |
| 504 | 507 |
| 505 StoragePartitionImpl* storage_partition = new StoragePartitionImpl( | 508 StoragePartitionImpl* storage_partition = new StoragePartitionImpl( |
| 506 context, partition_path, quota_manager.get(), appcache_service.get(), | 509 context, partition_path, quota_manager.get(), appcache_service.get(), |
| 507 filesystem_context.get(), database_tracker.get(), | 510 filesystem_context.get(), database_tracker.get(), |
| 508 dom_storage_context.get(), indexed_db_context.get(), | 511 dom_storage_context.get(), indexed_db_context.get(), |
| 509 service_worker_context.get(), webrtc_identity_store.get(), | 512 service_worker_context.get(), webrtc_identity_store.get(), |
| 510 special_storage_policy.get(), geofencing_manager.get(), | 513 special_storage_policy.get(), geofencing_manager.get(), |
| 511 host_zoom_level_context.get(), navigator_connect_context.get(), | 514 host_zoom_level_context.get(), navigator_connect_context.get(), |
| 512 platform_notification_context.get()); | 515 platform_notification_context.get()); |
| 513 | 516 |
| (...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 893 net::URLRequestContextGetter* url_request_context) { | 896 net::URLRequestContextGetter* url_request_context) { |
| 894 url_request_context_ = url_request_context; | 897 url_request_context_ = url_request_context; |
| 895 } | 898 } |
| 896 | 899 |
| 897 void StoragePartitionImpl::SetMediaURLRequestContext( | 900 void StoragePartitionImpl::SetMediaURLRequestContext( |
| 898 net::URLRequestContextGetter* media_url_request_context) { | 901 net::URLRequestContextGetter* media_url_request_context) { |
| 899 media_url_request_context_ = media_url_request_context; | 902 media_url_request_context_ = media_url_request_context; |
| 900 } | 903 } |
| 901 | 904 |
| 902 } // namespace content | 905 } // namespace content |
| OLD | NEW |