Index: content/browser/background_fetch/background_fetch_context.cc |
diff --git a/content/browser/background_fetch/background_fetch_context.cc b/content/browser/background_fetch/background_fetch_context.cc |
index d71a9a5674553cd52e9c5c1226e883ff54fa7ff4..11e58e55e29e346b3f6401a6ff88453894faa52f 100644 |
--- a/content/browser/background_fetch/background_fetch_context.cc |
+++ b/content/browser/background_fetch/background_fetch_context.cc |
@@ -174,7 +174,8 @@ void BackgroundFetchContext::DidCompleteJob( |
// The `backgroundfetched` and/or `backgroundfetchfail` event will only be |
// invoked for Background Fetch jobs which have been completed. |
if (controller->state() != BackgroundFetchJobController::State::COMPLETED) { |
- DeleteRegistration(registration_id); |
+ DeleteRegistration(registration_id, |
+ std::vector<std::unique_ptr<BlobHandle>>()); |
return; |
} |
@@ -191,7 +192,7 @@ void BackgroundFetchContext::DidGetSettledFetches( |
std::vector<BackgroundFetchSettledFetch> settled_fetches, |
std::vector<std::unique_ptr<BlobHandle>> blob_handles) { |
if (error != blink::mojom::BackgroundFetchError::NONE) { |
- DeleteRegistration(registration_id); |
+ DeleteRegistration(registration_id, std::move(blob_handles)); |
return; |
} |
@@ -202,11 +203,12 @@ void BackgroundFetchContext::DidGetSettledFetches( |
event_dispatcher_->DispatchBackgroundFetchedEvent( |
registration_id, std::move(settled_fetches), |
base::Bind(&BackgroundFetchContext::DeleteRegistration, this, |
- registration_id)); |
+ registration_id, std::move(blob_handles))); |
} |
void BackgroundFetchContext::DeleteRegistration( |
- const BackgroundFetchRegistrationId& registration_id) { |
+ const BackgroundFetchRegistrationId& registration_id, |
+ const std::vector<std::unique_ptr<BlobHandle>>& blob_handles) { |
harkness
2017/04/05 09:26:00
Why do you think we're going to need the blob hand
Peter Beverloo
2017/04/05 09:39:27
We don't, but we need to keep the handles alive fo
|
DCHECK_GT(active_fetches_.count(registration_id), 0u); |
// Delete all persistent information associated with the |registration_id|. |