Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(598)

Side by Side Diff: content/browser/storage_partition_impl.cc

Issue 2973233002: [Background Fetch] Cleanup/fix thread safety (Closed)
Patch Set: Remove n.b. from comments Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/browser/blob_storage/chrome_blob_storage_context.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 399 matching lines...) Expand 10 before | Expand all | Expand 10 after
410 410
411 if (GetServiceWorkerContext()) 411 if (GetServiceWorkerContext())
412 GetServiceWorkerContext()->Shutdown(); 412 GetServiceWorkerContext()->Shutdown();
413 413
414 if (GetCacheStorageContext()) 414 if (GetCacheStorageContext())
415 GetCacheStorageContext()->Shutdown(); 415 GetCacheStorageContext()->Shutdown();
416 416
417 if (GetPlatformNotificationContext()) 417 if (GetPlatformNotificationContext())
418 GetPlatformNotificationContext()->Shutdown(); 418 GetPlatformNotificationContext()->Shutdown();
419 419
420 if (GetBackgroundFetchContext())
421 GetBackgroundFetchContext()->Shutdown();
422
423 if (GetBackgroundSyncContext()) 420 if (GetBackgroundSyncContext())
424 GetBackgroundSyncContext()->Shutdown(); 421 GetBackgroundSyncContext()->Shutdown();
425 422
426 if (GetPaymentAppContext()) 423 if (GetPaymentAppContext())
427 GetPaymentAppContext()->Shutdown(); 424 GetPaymentAppContext()->Shutdown();
428 } 425 }
429 426
430 // static 427 // static
431 std::unique_ptr<StoragePartitionImpl> StoragePartitionImpl::Create( 428 std::unique_ptr<StoragePartitionImpl> StoragePartitionImpl::Create(
432 BrowserContext* context, 429 BrowserContext* context,
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
510 #if !defined(OS_ANDROID) 507 #if !defined(OS_ANDROID)
511 partition->host_zoom_level_context_ = new HostZoomLevelContext( 508 partition->host_zoom_level_context_ = new HostZoomLevelContext(
512 context->CreateZoomLevelDelegate(partition_path)); 509 context->CreateZoomLevelDelegate(partition_path));
513 #endif // !defined(OS_ANDROID) 510 #endif // !defined(OS_ANDROID)
514 511
515 partition->platform_notification_context_ = 512 partition->platform_notification_context_ =
516 new PlatformNotificationContextImpl(path, context, 513 new PlatformNotificationContextImpl(path, context,
517 partition->service_worker_context_); 514 partition->service_worker_context_);
518 partition->platform_notification_context_->Initialize(); 515 partition->platform_notification_context_->Initialize();
519 516
520 partition->background_fetch_context_ = new BackgroundFetchContext( 517 partition->background_fetch_context_ =
521 context, partition.get(), partition->service_worker_context_); 518 new BackgroundFetchContext(context, partition->service_worker_context_);
522 519
523 partition->background_sync_context_ = new BackgroundSyncContext(); 520 partition->background_sync_context_ = new BackgroundSyncContext();
524 partition->background_sync_context_->Init(partition->service_worker_context_); 521 partition->background_sync_context_->Init(partition->service_worker_context_);
525 522
526 partition->payment_app_context_ = new PaymentAppContextImpl(); 523 partition->payment_app_context_ = new PaymentAppContextImpl();
527 partition->payment_app_context_->Init(partition->service_worker_context_); 524 partition->payment_app_context_->Init(partition->service_worker_context_);
528 525
529 partition->broadcast_channel_provider_ = new BroadcastChannelProvider(); 526 partition->broadcast_channel_provider_ = new BroadcastChannelProvider();
530 527
531 partition->bluetooth_allowed_devices_map_ = new BluetoothAllowedDevicesMap(); 528 partition->bluetooth_allowed_devices_map_ = new BluetoothAllowedDevicesMap();
(...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after
990 media_url_request_context_ = media_url_request_context; 987 media_url_request_context_ = media_url_request_context;
991 } 988 }
992 989
993 void StoragePartitionImpl::GetQuotaSettings( 990 void StoragePartitionImpl::GetQuotaSettings(
994 storage::OptionalQuotaSettingsCallback callback) { 991 storage::OptionalQuotaSettingsCallback callback) {
995 GetContentClient()->browser()->GetQuotaSettings(browser_context_, this, 992 GetContentClient()->browser()->GetQuotaSettings(browser_context_, this,
996 std::move(callback)); 993 std::move(callback));
997 } 994 }
998 995
999 } // namespace content 996 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/blob_storage/chrome_blob_storage_context.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698