| 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> |
| (...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 391 | 391 |
| 392 if (GetServiceWorkerContext()) | 392 if (GetServiceWorkerContext()) |
| 393 GetServiceWorkerContext()->Shutdown(); | 393 GetServiceWorkerContext()->Shutdown(); |
| 394 | 394 |
| 395 if (GetCacheStorageContext()) | 395 if (GetCacheStorageContext()) |
| 396 GetCacheStorageContext()->Shutdown(); | 396 GetCacheStorageContext()->Shutdown(); |
| 397 | 397 |
| 398 if (GetPlatformNotificationContext()) | 398 if (GetPlatformNotificationContext()) |
| 399 GetPlatformNotificationContext()->Shutdown(); | 399 GetPlatformNotificationContext()->Shutdown(); |
| 400 | 400 |
| 401 if (GetBackgroundFetchContext()) |
| 402 GetBackgroundFetchContext()->Shutdown(); |
| 403 |
| 401 if (GetBackgroundSyncContext()) | 404 if (GetBackgroundSyncContext()) |
| 402 GetBackgroundSyncContext()->Shutdown(); | 405 GetBackgroundSyncContext()->Shutdown(); |
| 403 | 406 |
| 404 if (GetPaymentAppContext()) | 407 if (GetPaymentAppContext()) |
| 405 GetPaymentAppContext()->Shutdown(); | 408 GetPaymentAppContext()->Shutdown(); |
| 406 } | 409 } |
| 407 | 410 |
| 408 // static | 411 // static |
| 409 std::unique_ptr<StoragePartitionImpl> StoragePartitionImpl::Create( | 412 std::unique_ptr<StoragePartitionImpl> StoragePartitionImpl::Create( |
| 410 BrowserContext* context, | 413 BrowserContext* context, |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 482 new PushMessagingContext(context, partition->service_worker_context_); | 485 new PushMessagingContext(context, partition->service_worker_context_); |
| 483 | 486 |
| 484 partition->host_zoom_level_context_ = new HostZoomLevelContext( | 487 partition->host_zoom_level_context_ = new HostZoomLevelContext( |
| 485 context->CreateZoomLevelDelegate(partition_path)); | 488 context->CreateZoomLevelDelegate(partition_path)); |
| 486 | 489 |
| 487 partition->platform_notification_context_ = | 490 partition->platform_notification_context_ = |
| 488 new PlatformNotificationContextImpl(path, context, | 491 new PlatformNotificationContextImpl(path, context, |
| 489 partition->service_worker_context_); | 492 partition->service_worker_context_); |
| 490 partition->platform_notification_context_->Initialize(); | 493 partition->platform_notification_context_->Initialize(); |
| 491 | 494 |
| 495 partition->background_fetch_context_ = new BackgroundFetchContext( |
| 496 context, partition.get(), partition->service_worker_context_); |
| 497 |
| 492 partition->background_sync_context_ = new BackgroundSyncContext(); | 498 partition->background_sync_context_ = new BackgroundSyncContext(); |
| 493 partition->background_sync_context_->Init(partition->service_worker_context_); | 499 partition->background_sync_context_->Init(partition->service_worker_context_); |
| 494 | 500 |
| 495 partition->payment_app_context_ = new PaymentAppContextImpl(); | 501 partition->payment_app_context_ = new PaymentAppContextImpl(); |
| 496 partition->payment_app_context_->Init(partition->service_worker_context_); | 502 partition->payment_app_context_->Init(partition->service_worker_context_); |
| 497 | 503 |
| 498 partition->broadcast_channel_provider_ = new BroadcastChannelProvider(); | 504 partition->broadcast_channel_provider_ = new BroadcastChannelProvider(); |
| 499 | 505 |
| 500 partition->bluetooth_allowed_devices_map_ = new BluetoothAllowedDevicesMap(); | 506 partition->bluetooth_allowed_devices_map_ = new BluetoothAllowedDevicesMap(); |
| 501 | 507 |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 559 ZoomLevelDelegate* StoragePartitionImpl::GetZoomLevelDelegate() { | 565 ZoomLevelDelegate* StoragePartitionImpl::GetZoomLevelDelegate() { |
| 560 DCHECK(host_zoom_level_context_.get()); | 566 DCHECK(host_zoom_level_context_.get()); |
| 561 return host_zoom_level_context_->GetZoomLevelDelegate(); | 567 return host_zoom_level_context_->GetZoomLevelDelegate(); |
| 562 } | 568 } |
| 563 | 569 |
| 564 PlatformNotificationContextImpl* | 570 PlatformNotificationContextImpl* |
| 565 StoragePartitionImpl::GetPlatformNotificationContext() { | 571 StoragePartitionImpl::GetPlatformNotificationContext() { |
| 566 return platform_notification_context_.get(); | 572 return platform_notification_context_.get(); |
| 567 } | 573 } |
| 568 | 574 |
| 575 BackgroundFetchContext* StoragePartitionImpl::GetBackgroundFetchContext() { |
| 576 return background_fetch_context_.get(); |
| 577 } |
| 578 |
| 569 BackgroundSyncContext* StoragePartitionImpl::GetBackgroundSyncContext() { | 579 BackgroundSyncContext* StoragePartitionImpl::GetBackgroundSyncContext() { |
| 570 return background_sync_context_.get(); | 580 return background_sync_context_.get(); |
| 571 } | 581 } |
| 572 | 582 |
| 573 PaymentAppContextImpl* StoragePartitionImpl::GetPaymentAppContext() { | 583 PaymentAppContextImpl* StoragePartitionImpl::GetPaymentAppContext() { |
| 574 return payment_app_context_.get(); | 584 return payment_app_context_.get(); |
| 575 } | 585 } |
| 576 | 586 |
| 577 BroadcastChannelProvider* StoragePartitionImpl::GetBroadcastChannelProvider() { | 587 BroadcastChannelProvider* StoragePartitionImpl::GetBroadcastChannelProvider() { |
| 578 return broadcast_channel_provider_.get(); | 588 return broadcast_channel_provider_.get(); |
| (...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 906 media_url_request_context_ = media_url_request_context; | 916 media_url_request_context_ = media_url_request_context; |
| 907 } | 917 } |
| 908 | 918 |
| 909 void StoragePartitionImpl::GetQuotaSettings( | 919 void StoragePartitionImpl::GetQuotaSettings( |
| 910 const storage::OptionalQuotaSettingsCallback& callback) { | 920 const storage::OptionalQuotaSettingsCallback& callback) { |
| 911 GetContentClient()->browser()->GetQuotaSettings(browser_context_, this, | 921 GetContentClient()->browser()->GetQuotaSettings(browser_context_, this, |
| 912 callback); | 922 callback); |
| 913 } | 923 } |
| 914 | 924 |
| 915 } // namespace content | 925 } // namespace content |
| OLD | NEW |