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 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
415 GetDOMStorageContext()->Shutdown(); | 415 GetDOMStorageContext()->Shutdown(); |
416 | 416 |
417 if (GetServiceWorkerContext()) | 417 if (GetServiceWorkerContext()) |
418 GetServiceWorkerContext()->Shutdown(); | 418 GetServiceWorkerContext()->Shutdown(); |
419 | 419 |
420 if (GetCacheStorageContext()) | 420 if (GetCacheStorageContext()) |
421 GetCacheStorageContext()->Shutdown(); | 421 GetCacheStorageContext()->Shutdown(); |
422 | 422 |
423 if (GetGeofencingManager()) | 423 if (GetGeofencingManager()) |
424 GetGeofencingManager()->Shutdown(); | 424 GetGeofencingManager()->Shutdown(); |
| 425 |
| 426 if (GetPlatformNotificationContext()) |
| 427 GetPlatformNotificationContext()->Shutdown(); |
425 } | 428 } |
426 | 429 |
427 StoragePartitionImpl* StoragePartitionImpl::Create( | 430 StoragePartitionImpl* StoragePartitionImpl::Create( |
428 BrowserContext* context, | 431 BrowserContext* context, |
429 bool in_memory, | 432 bool in_memory, |
430 const base::FilePath& partition_path) { | 433 const base::FilePath& partition_path) { |
431 // Ensure that these methods are called on the UI thread, except for | 434 // Ensure that these methods are called on the UI thread, except for |
432 // unittests where a UI thread might not have been created. | 435 // unittests where a UI thread might not have been created. |
433 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI) || | 436 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI) || |
434 !BrowserThread::IsMessageLoopValid(BrowserThread::UI)); | 437 !BrowserThread::IsMessageLoopValid(BrowserThread::UI)); |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
503 scoped_refptr<HostZoomLevelContext> host_zoom_level_context( | 506 scoped_refptr<HostZoomLevelContext> host_zoom_level_context( |
504 new HostZoomLevelContext( | 507 new HostZoomLevelContext( |
505 context->CreateZoomLevelDelegate(partition_path))); | 508 context->CreateZoomLevelDelegate(partition_path))); |
506 | 509 |
507 scoped_refptr<NavigatorConnectContextImpl> navigator_connect_context = | 510 scoped_refptr<NavigatorConnectContextImpl> navigator_connect_context = |
508 new NavigatorConnectContextImpl(); | 511 new NavigatorConnectContextImpl(); |
509 navigator_connect_context->AddFactory(make_scoped_ptr( | 512 navigator_connect_context->AddFactory(make_scoped_ptr( |
510 new NavigatorConnectServiceWorkerServiceFactory(service_worker_context))); | 513 new NavigatorConnectServiceWorkerServiceFactory(service_worker_context))); |
511 | 514 |
512 scoped_refptr<PlatformNotificationContextImpl> platform_notification_context = | 515 scoped_refptr<PlatformNotificationContextImpl> platform_notification_context = |
513 new PlatformNotificationContextImpl(path); | 516 new PlatformNotificationContextImpl(path, service_worker_context); |
| 517 platform_notification_context->Initialize(); |
514 | 518 |
515 StoragePartitionImpl* storage_partition = new StoragePartitionImpl( | 519 StoragePartitionImpl* storage_partition = new StoragePartitionImpl( |
516 context, partition_path, quota_manager.get(), appcache_service.get(), | 520 context, partition_path, quota_manager.get(), appcache_service.get(), |
517 filesystem_context.get(), database_tracker.get(), | 521 filesystem_context.get(), database_tracker.get(), |
518 dom_storage_context.get(), indexed_db_context.get(), | 522 dom_storage_context.get(), indexed_db_context.get(), |
519 cache_storage_context.get(), service_worker_context.get(), | 523 cache_storage_context.get(), service_worker_context.get(), |
520 webrtc_identity_store.get(), special_storage_policy.get(), | 524 webrtc_identity_store.get(), special_storage_policy.get(), |
521 geofencing_manager.get(), host_zoom_level_context.get(), | 525 geofencing_manager.get(), host_zoom_level_context.get(), |
522 navigator_connect_context.get(), | 526 navigator_connect_context.get(), |
523 platform_notification_context.get()); | 527 platform_notification_context.get()); |
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
908 net::URLRequestContextGetter* url_request_context) { | 912 net::URLRequestContextGetter* url_request_context) { |
909 url_request_context_ = url_request_context; | 913 url_request_context_ = url_request_context; |
910 } | 914 } |
911 | 915 |
912 void StoragePartitionImpl::SetMediaURLRequestContext( | 916 void StoragePartitionImpl::SetMediaURLRequestContext( |
913 net::URLRequestContextGetter* media_url_request_context) { | 917 net::URLRequestContextGetter* media_url_request_context) { |
914 media_url_request_context_ = media_url_request_context; | 918 media_url_request_context_ = media_url_request_context; |
915 } | 919 } |
916 | 920 |
917 } // namespace content | 921 } // namespace content |
OLD | NEW |