| Index: content/browser/background_fetch/background_fetch_embedded_worker_test_helper.cc
|
| diff --git a/content/browser/background_fetch/background_fetch_embedded_worker_test_helper.cc b/content/browser/background_fetch/background_fetch_embedded_worker_test_helper.cc
|
| index 62c73b2f20e344d743b2934364d9639a1af8a39d..e5d4b165cd07aa9684d868d2d8cb21e5de1ec9d8 100644
|
| --- a/content/browser/background_fetch/background_fetch_embedded_worker_test_helper.cc
|
| +++ b/content/browser/background_fetch/background_fetch_embedded_worker_test_helper.cc
|
| @@ -21,15 +21,15 @@ BackgroundFetchEmbeddedWorkerTestHelper::
|
|
|
| void BackgroundFetchEmbeddedWorkerTestHelper::OnBackgroundFetchAbortEvent(
|
| const std::string& tag,
|
| - const mojom::ServiceWorkerEventDispatcher::
|
| - DispatchBackgroundFetchAbortEventCallback& callback) {
|
| + mojom::ServiceWorkerEventDispatcher::
|
| + DispatchBackgroundFetchAbortEventCallback callback) {
|
| last_tag_ = tag;
|
|
|
| if (fail_abort_event_) {
|
| - callback.Run(SERVICE_WORKER_ERROR_EVENT_WAITUNTIL_REJECTED,
|
| - base::Time::Now());
|
| + std::move(callback).Run(SERVICE_WORKER_ERROR_EVENT_WAITUNTIL_REJECTED,
|
| + base::Time::Now());
|
| } else {
|
| - callback.Run(SERVICE_WORKER_OK, base::Time::Now());
|
| + std::move(callback).Run(SERVICE_WORKER_OK, base::Time::Now());
|
| }
|
|
|
| if (abort_event_closure_)
|
| @@ -39,16 +39,16 @@ void BackgroundFetchEmbeddedWorkerTestHelper::OnBackgroundFetchAbortEvent(
|
| void BackgroundFetchEmbeddedWorkerTestHelper::OnBackgroundFetchClickEvent(
|
| const std::string& tag,
|
| mojom::BackgroundFetchState state,
|
| - const mojom::ServiceWorkerEventDispatcher::
|
| - DispatchBackgroundFetchClickEventCallback& callback) {
|
| + mojom::ServiceWorkerEventDispatcher::
|
| + DispatchBackgroundFetchClickEventCallback callback) {
|
| last_tag_ = tag;
|
| last_state_ = state;
|
|
|
| if (fail_click_event_) {
|
| - callback.Run(SERVICE_WORKER_ERROR_EVENT_WAITUNTIL_REJECTED,
|
| - base::Time::Now());
|
| + std::move(callback).Run(SERVICE_WORKER_ERROR_EVENT_WAITUNTIL_REJECTED,
|
| + base::Time::Now());
|
| } else {
|
| - callback.Run(SERVICE_WORKER_OK, base::Time::Now());
|
| + std::move(callback).Run(SERVICE_WORKER_OK, base::Time::Now());
|
| }
|
|
|
| if (click_event_closure_)
|
| @@ -58,16 +58,16 @@ void BackgroundFetchEmbeddedWorkerTestHelper::OnBackgroundFetchClickEvent(
|
| void BackgroundFetchEmbeddedWorkerTestHelper::OnBackgroundFetchFailEvent(
|
| const std::string& tag,
|
| const std::vector<BackgroundFetchSettledFetch>& fetches,
|
| - const mojom::ServiceWorkerEventDispatcher::
|
| - DispatchBackgroundFetchFailEventCallback& callback) {
|
| + mojom::ServiceWorkerEventDispatcher::
|
| + DispatchBackgroundFetchFailEventCallback callback) {
|
| last_tag_ = tag;
|
| last_fetches_ = fetches;
|
|
|
| if (fail_fetch_fail_event_) {
|
| - callback.Run(SERVICE_WORKER_ERROR_EVENT_WAITUNTIL_REJECTED,
|
| - base::Time::Now());
|
| + std::move(callback).Run(SERVICE_WORKER_ERROR_EVENT_WAITUNTIL_REJECTED,
|
| + base::Time::Now());
|
| } else {
|
| - callback.Run(SERVICE_WORKER_OK, base::Time::Now());
|
| + std::move(callback).Run(SERVICE_WORKER_OK, base::Time::Now());
|
| }
|
|
|
| if (fetch_fail_event_closure_)
|
| @@ -77,16 +77,16 @@ void BackgroundFetchEmbeddedWorkerTestHelper::OnBackgroundFetchFailEvent(
|
| void BackgroundFetchEmbeddedWorkerTestHelper::OnBackgroundFetchedEvent(
|
| const std::string& tag,
|
| const std::vector<BackgroundFetchSettledFetch>& fetches,
|
| - const mojom::ServiceWorkerEventDispatcher::
|
| - DispatchBackgroundFetchedEventCallback& callback) {
|
| + mojom::ServiceWorkerEventDispatcher::DispatchBackgroundFetchedEventCallback
|
| + callback) {
|
| last_tag_ = tag;
|
| last_fetches_ = fetches;
|
|
|
| if (fail_fetched_event_) {
|
| - callback.Run(SERVICE_WORKER_ERROR_EVENT_WAITUNTIL_REJECTED,
|
| - base::Time::Now());
|
| + std::move(callback).Run(SERVICE_WORKER_ERROR_EVENT_WAITUNTIL_REJECTED,
|
| + base::Time::Now());
|
| } else {
|
| - callback.Run(SERVICE_WORKER_OK, base::Time::Now());
|
| + std::move(callback).Run(SERVICE_WORKER_OK, base::Time::Now());
|
| }
|
|
|
| if (fetched_event_closure_)
|
|
|