New issue
Advanced search Search tips

Issue 730593 link

Starred by 1 user

Issue metadata

Status: Assigned
Owner:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug

Blocking:
issue 714018



Sign in to add a comment

Remove AdaptCallbackForRepeating for a callback dup on success/error handling

Project Member Reported by tzik@chromium.org, Jun 7 2017

Issue description

A common pattern of AdaptCallbackForRepeating is success/error handling:

void Foo(base::OnceClosure success, base::OnceClosure error);

void Bar(base::OnceClosure callback) {
  base::RepeatingClosure copyable_callback =
      base::AdaptCallbackForRepeating(std::move(callback));
  Foo(copyable_callback, copyable_callback);
}

The ACFR here is introduced as a workaround for migration from copyable base::Callback to move-only base::OnceCallback, and should be removed by modifying the interface around Foo().

This is a tracking bug for newly added cases and their removal.
 
Blocking: 714018
Project Member

Comment 2 by bugdroid1@chromium.org, Jun 15 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/0b744b9b42e9b6cf0a5267d1e81f0d345d8a759e

commit 0b744b9b42e9b6cf0a5267d1e81f0d345d8a759e
Author: tzik <tzik@chromium.org>
Date: Thu Jun 15 01:59:04 2017

Use OnceCallback on Mojo interfaces in Blink public/ interfaces

This CL flips `use_once_callback` flag on the Mojo code generator, and
fixes all compile errors after it. After this CL, Mojo interfaces in
Blink public/BUILD.gn starts using base::OnceCallback instead of
base::Callback on its return value handling.

The migration recipe was:
 - Convert pass-by-ref callback objects to pass-by-value.
 - Use std::move() to forward it to other consumer, or to invoke it
   with Callback::Run().
 - Handle wherever copies are required manually.
 - Check if the conversion doesn't change the semantics. As the transfer
   and invocation clobber the callback object, care about use-after-move.
   It's considered safe to consume almost scoped-out callback.

Bug: 714018, 729950, 730593
Change-Id: Ie691ab5d299815cb022bb4e298d4e318c375efec
Reviewed-on: https://chromium-review.googlesource.com/517811
Reviewed-by: Xiaohan Wang <xhwang@chromium.org>
Reviewed-by: Koji Ishii <kojii@chromium.org>
Reviewed-by: Peter Beverloo <peter@chromium.org>
Reviewed-by: mark a. foltz <mfoltz@chromium.org>
Reviewed-by: Vincent Scheib <scheib@chromium.org>
Reviewed-by: Mounir Lamouri <mlamouri@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Josh Karlin <jkarlin@chromium.org>
Reviewed-by: Derek Cheng <imcheng@chromium.org>
Reviewed-by: Matt Giuca <mgiuca@chromium.org>
Commit-Queue: Taiju Tsuiki <tzik@chromium.org>
Cr-Commit-Position: refs/heads/master@{#479580}
[modify] https://crrev.com/0b744b9b42e9b6cf0a5267d1e81f0d345d8a759e/chrome/browser/budget_service/budget_database.cc
[modify] https://crrev.com/0b744b9b42e9b6cf0a5267d1e81f0d345d8a759e/chrome/browser/budget_service/budget_database.h
[modify] https://crrev.com/0b744b9b42e9b6cf0a5267d1e81f0d345d8a759e/chrome/browser/budget_service/budget_manager.cc
[modify] https://crrev.com/0b744b9b42e9b6cf0a5267d1e81f0d345d8a759e/chrome/browser/budget_service/budget_manager.h
[modify] https://crrev.com/0b744b9b42e9b6cf0a5267d1e81f0d345d8a759e/chrome/browser/budget_service/budget_service_impl.cc
[modify] https://crrev.com/0b744b9b42e9b6cf0a5267d1e81f0d345d8a759e/chrome/browser/budget_service/budget_service_impl.h
[modify] https://crrev.com/0b744b9b42e9b6cf0a5267d1e81f0d345d8a759e/chrome/browser/media/android/router/media_router_android.cc
[modify] https://crrev.com/0b744b9b42e9b6cf0a5267d1e81f0d345d8a759e/chrome/browser/media/android/router/media_router_android.h
[modify] https://crrev.com/0b744b9b42e9b6cf0a5267d1e81f0d345d8a759e/chrome/browser/media/android/router/media_router_dialog_controller_android.cc
[modify] https://crrev.com/0b744b9b42e9b6cf0a5267d1e81f0d345d8a759e/chrome/browser/media/cast_remoting_connector_unittest.cc
[modify] https://crrev.com/0b744b9b42e9b6cf0a5267d1e81f0d345d8a759e/chrome/browser/media/router/browser_presentation_connection_proxy.cc
[modify] https://crrev.com/0b744b9b42e9b6cf0a5267d1e81f0d345d8a759e/chrome/browser/media/router/browser_presentation_connection_proxy.h
[modify] https://crrev.com/0b744b9b42e9b6cf0a5267d1e81f0d345d8a759e/chrome/browser/media/router/browser_presentation_connection_proxy_unittest.cc
[modify] https://crrev.com/0b744b9b42e9b6cf0a5267d1e81f0d345d8a759e/chrome/browser/media/router/create_presentation_connection_request.cc
[modify] https://crrev.com/0b744b9b42e9b6cf0a5267d1e81f0d345d8a759e/chrome/browser/media/router/create_presentation_connection_request.h
[modify] https://crrev.com/0b744b9b42e9b6cf0a5267d1e81f0d345d8a759e/chrome/browser/media/router/media_router.h
[modify] https://crrev.com/0b744b9b42e9b6cf0a5267d1e81f0d345d8a759e/chrome/browser/media/router/mock_media_router.h
[modify] https://crrev.com/0b744b9b42e9b6cf0a5267d1e81f0d345d8a759e/chrome/browser/media/router/mojo/media_router_mojo_impl.cc
[modify] https://crrev.com/0b744b9b42e9b6cf0a5267d1e81f0d345d8a759e/chrome/browser/media/router/mojo/media_router_mojo_impl.h
[modify] https://crrev.com/0b744b9b42e9b6cf0a5267d1e81f0d345d8a759e/chrome/browser/media/router/mojo/media_router_mojo_impl_unittest.cc
[modify] https://crrev.com/0b744b9b42e9b6cf0a5267d1e81f0d345d8a759e/chrome/browser/media/router/presentation_service_delegate_impl.cc
[modify] https://crrev.com/0b744b9b42e9b6cf0a5267d1e81f0d345d8a759e/chrome/browser/media/router/presentation_service_delegate_impl.h
[modify] https://crrev.com/0b744b9b42e9b6cf0a5267d1e81f0d345d8a759e/chrome/browser/media/router/presentation_service_delegate_impl_unittest.cc
[modify] https://crrev.com/0b744b9b42e9b6cf0a5267d1e81f0d345d8a759e/chrome/browser/ui/webui/media_router/media_router_ui.cc
[modify] https://crrev.com/0b744b9b42e9b6cf0a5267d1e81f0d345d8a759e/chrome/browser/ui/webui/media_router/media_router_ui_unittest.cc
[modify] https://crrev.com/0b744b9b42e9b6cf0a5267d1e81f0d345d8a759e/chrome/browser/webshare/share_service_impl.cc
[modify] https://crrev.com/0b744b9b42e9b6cf0a5267d1e81f0d345d8a759e/chrome/browser/webshare/share_service_impl.h
[modify] https://crrev.com/0b744b9b42e9b6cf0a5267d1e81f0d345d8a759e/chrome/test/media_router/media_router_e2e_browsertest.cc
[modify] https://crrev.com/0b744b9b42e9b6cf0a5267d1e81f0d345d8a759e/content/browser/background_fetch/background_fetch_context.cc
[modify] https://crrev.com/0b744b9b42e9b6cf0a5267d1e81f0d345d8a759e/content/browser/background_fetch/background_fetch_context.h
[modify] https://crrev.com/0b744b9b42e9b6cf0a5267d1e81f0d345d8a759e/content/browser/background_fetch/background_fetch_service_impl.cc
[modify] https://crrev.com/0b744b9b42e9b6cf0a5267d1e81f0d345d8a759e/content/browser/background_fetch/background_fetch_service_impl.h
[modify] https://crrev.com/0b744b9b42e9b6cf0a5267d1e81f0d345d8a759e/content/browser/background_sync/background_sync_service_impl.cc
[modify] https://crrev.com/0b744b9b42e9b6cf0a5267d1e81f0d345d8a759e/content/browser/background_sync/background_sync_service_impl.h
[modify] https://crrev.com/0b744b9b42e9b6cf0a5267d1e81f0d345d8a759e/content/browser/background_sync/background_sync_service_impl_unittest.cc
[modify] https://crrev.com/0b744b9b42e9b6cf0a5267d1e81f0d345d8a759e/content/browser/bluetooth/web_bluetooth_service_impl.cc
[modify] https://crrev.com/0b744b9b42e9b6cf0a5267d1e81f0d345d8a759e/content/browser/bluetooth/web_bluetooth_service_impl.h
[modify] https://crrev.com/0b744b9b42e9b6cf0a5267d1e81f0d345d8a759e/content/browser/hyphenation/hyphenation_impl.cc
[modify] https://crrev.com/0b744b9b42e9b6cf0a5267d1e81f0d345d8a759e/content/browser/hyphenation/hyphenation_impl.h
[modify] https://crrev.com/0b744b9b42e9b6cf0a5267d1e81f0d345d8a759e/content/browser/installedapp/installed_app_provider_impl_default.cc
[modify] https://crrev.com/0b744b9b42e9b6cf0a5267d1e81f0d345d8a759e/content/browser/installedapp/installed_app_provider_impl_default.h
[modify] https://crrev.com/0b744b9b42e9b6cf0a5267d1e81f0d345d8a759e/content/browser/keyboard_lock/keyboard_lock_service_impl.cc
[modify] https://crrev.com/0b744b9b42e9b6cf0a5267d1e81f0d345d8a759e/content/browser/keyboard_lock/keyboard_lock_service_impl.h
[modify] https://crrev.com/0b744b9b42e9b6cf0a5267d1e81f0d345d8a759e/content/browser/mime_registry_impl.cc
[modify] https://crrev.com/0b744b9b42e9b6cf0a5267d1e81f0d345d8a759e/content/browser/mime_registry_impl.h
[modify] https://crrev.com/0b744b9b42e9b6cf0a5267d1e81f0d345d8a759e/content/browser/notifications/blink_notification_service_impl.cc
[modify] https://crrev.com/0b744b9b42e9b6cf0a5267d1e81f0d345d8a759e/content/browser/notifications/blink_notification_service_impl.h
[modify] https://crrev.com/0b744b9b42e9b6cf0a5267d1e81f0d345d8a759e/content/browser/permissions/permission_service_impl.cc
[modify] https://crrev.com/0b744b9b42e9b6cf0a5267d1e81f0d345d8a759e/content/browser/permissions/permission_service_impl.h
[modify] https://crrev.com/0b744b9b42e9b6cf0a5267d1e81f0d345d8a759e/content/browser/presentation/presentation_service_impl.cc
[modify] https://crrev.com/0b744b9b42e9b6cf0a5267d1e81f0d345d8a759e/content/browser/presentation/presentation_service_impl.h
[modify] https://crrev.com/0b744b9b42e9b6cf0a5267d1e81f0d345d8a759e/content/browser/presentation/presentation_service_impl_unittest.cc
[modify] https://crrev.com/0b744b9b42e9b6cf0a5267d1e81f0d345d8a759e/content/public/browser/presentation_service_delegate.h
[modify] https://crrev.com/0b744b9b42e9b6cf0a5267d1e81f0d345d8a759e/content/renderer/manifest/manifest_manager.cc
[modify] https://crrev.com/0b744b9b42e9b6cf0a5267d1e81f0d345d8a759e/content/renderer/manifest/manifest_manager.h
[modify] https://crrev.com/0b744b9b42e9b6cf0a5267d1e81f0d345d8a759e/content/renderer/presentation/presentation_connection_proxy.cc
[modify] https://crrev.com/0b744b9b42e9b6cf0a5267d1e81f0d345d8a759e/content/renderer/presentation/presentation_connection_proxy.h
[modify] https://crrev.com/0b744b9b42e9b6cf0a5267d1e81f0d345d8a759e/content/renderer/presentation/presentation_dispatcher_unittest.cc
[modify] https://crrev.com/0b744b9b42e9b6cf0a5267d1e81f0d345d8a759e/third_party/WebKit/Source/modules/app_banner/AppBannerController.cpp
[modify] https://crrev.com/0b744b9b42e9b6cf0a5267d1e81f0d345d8a759e/third_party/WebKit/Source/modules/app_banner/AppBannerController.h
[modify] https://crrev.com/0b744b9b42e9b6cf0a5267d1e81f0d345d8a759e/third_party/WebKit/Source/modules/document_metadata/CopylessPasteServer.cpp
[modify] https://crrev.com/0b744b9b42e9b6cf0a5267d1e81f0d345d8a759e/third_party/WebKit/Source/modules/document_metadata/CopylessPasteServer.h
[modify] https://crrev.com/0b744b9b42e9b6cf0a5267d1e81f0d345d8a759e/third_party/WebKit/Source/platform/network/mime/MockMimeRegistry.h
[modify] https://crrev.com/0b744b9b42e9b6cf0a5267d1e81f0d345d8a759e/third_party/WebKit/public/BUILD.gn

Project Member

Comment 3 by bugdroid1@chromium.org, Jun 15 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/cf7bcd65f3716fefd0640fdac12ab172db587a02

commit cf7bcd65f3716fefd0640fdac12ab172db587a02
Author: tzik <tzik@chromium.org>
Date: Thu Jun 15 06:15:18 2017

[Reland] Use OnceCallback on Mojo interfaces in Blink public/ interfaces

This is the reland of https://chromium-review.googlesource.com/c/517811/,
which conflicted to other changes and got reverted.

This CL flips `use_once_callback` flag on the Mojo code generator, and
fixes all compile errors after it. After this CL, Mojo interfaces in
Blink public/BUILD.gn starts using base::OnceCallback instead of
base::Callback on its return value handling.

The migration recipe was:
 - Convert pass-by-ref callback objects to pass-by-value.
 - Use std::move() to forward it to other consumer, or to invoke it
   with Callback::Run().
 - Handle wherever copies are required manually.
 - Check if the conversion doesn't change the semantics. As the transfer
   and invocation clobber the callback object, care about use-after-move.
   It's considered safe to consume almost scoped-out callback.

TBR=xhwang@chromium.org, kojii@chromium.org, peter@chromium.org, mfoltz@chromium.org, scheib@chromium.org, mlamouri@chromium.org, haraken@chromium.org, kinuko@chromium.org, jkarlin@chromium.org, imcheng@chromium.org, mgiuca@chromium.org

Bug: 714018, 729950, 730593

Change-Id: I6af43ac56de63ae9fc962f474df8e04b3bfa905a
Reviewed-on: https://chromium-review.googlesource.com/536095
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Taiju Tsuiki <tzik@chromium.org>
Cr-Commit-Position: refs/heads/master@{#479622}
[modify] https://crrev.com/cf7bcd65f3716fefd0640fdac12ab172db587a02/chrome/browser/budget_service/budget_database.cc
[modify] https://crrev.com/cf7bcd65f3716fefd0640fdac12ab172db587a02/chrome/browser/budget_service/budget_database.h
[modify] https://crrev.com/cf7bcd65f3716fefd0640fdac12ab172db587a02/chrome/browser/budget_service/budget_manager.cc
[modify] https://crrev.com/cf7bcd65f3716fefd0640fdac12ab172db587a02/chrome/browser/budget_service/budget_manager.h
[modify] https://crrev.com/cf7bcd65f3716fefd0640fdac12ab172db587a02/chrome/browser/budget_service/budget_service_impl.cc
[modify] https://crrev.com/cf7bcd65f3716fefd0640fdac12ab172db587a02/chrome/browser/budget_service/budget_service_impl.h
[modify] https://crrev.com/cf7bcd65f3716fefd0640fdac12ab172db587a02/chrome/browser/media/android/router/media_router_android.cc
[modify] https://crrev.com/cf7bcd65f3716fefd0640fdac12ab172db587a02/chrome/browser/media/android/router/media_router_android.h
[modify] https://crrev.com/cf7bcd65f3716fefd0640fdac12ab172db587a02/chrome/browser/media/android/router/media_router_dialog_controller_android.cc
[modify] https://crrev.com/cf7bcd65f3716fefd0640fdac12ab172db587a02/chrome/browser/media/cast_remoting_connector_unittest.cc
[modify] https://crrev.com/cf7bcd65f3716fefd0640fdac12ab172db587a02/chrome/browser/media/router/browser_presentation_connection_proxy.cc
[modify] https://crrev.com/cf7bcd65f3716fefd0640fdac12ab172db587a02/chrome/browser/media/router/browser_presentation_connection_proxy.h
[modify] https://crrev.com/cf7bcd65f3716fefd0640fdac12ab172db587a02/chrome/browser/media/router/browser_presentation_connection_proxy_unittest.cc
[modify] https://crrev.com/cf7bcd65f3716fefd0640fdac12ab172db587a02/chrome/browser/media/router/create_presentation_connection_request.cc
[modify] https://crrev.com/cf7bcd65f3716fefd0640fdac12ab172db587a02/chrome/browser/media/router/create_presentation_connection_request.h
[modify] https://crrev.com/cf7bcd65f3716fefd0640fdac12ab172db587a02/chrome/browser/media/router/media_router.h
[modify] https://crrev.com/cf7bcd65f3716fefd0640fdac12ab172db587a02/chrome/browser/media/router/mock_media_router.h
[modify] https://crrev.com/cf7bcd65f3716fefd0640fdac12ab172db587a02/chrome/browser/media/router/mojo/media_router_mojo_impl.cc
[modify] https://crrev.com/cf7bcd65f3716fefd0640fdac12ab172db587a02/chrome/browser/media/router/mojo/media_router_mojo_impl.h
[modify] https://crrev.com/cf7bcd65f3716fefd0640fdac12ab172db587a02/chrome/browser/media/router/mojo/media_router_mojo_impl_unittest.cc
[modify] https://crrev.com/cf7bcd65f3716fefd0640fdac12ab172db587a02/chrome/browser/media/router/presentation_service_delegate_impl.cc
[modify] https://crrev.com/cf7bcd65f3716fefd0640fdac12ab172db587a02/chrome/browser/media/router/presentation_service_delegate_impl.h
[modify] https://crrev.com/cf7bcd65f3716fefd0640fdac12ab172db587a02/chrome/browser/media/router/presentation_service_delegate_impl_unittest.cc
[modify] https://crrev.com/cf7bcd65f3716fefd0640fdac12ab172db587a02/chrome/browser/ui/webui/media_router/media_router_ui.cc
[modify] https://crrev.com/cf7bcd65f3716fefd0640fdac12ab172db587a02/chrome/browser/ui/webui/media_router/media_router_ui_unittest.cc
[modify] https://crrev.com/cf7bcd65f3716fefd0640fdac12ab172db587a02/chrome/browser/webshare/share_service_impl.cc
[modify] https://crrev.com/cf7bcd65f3716fefd0640fdac12ab172db587a02/chrome/browser/webshare/share_service_impl.h
[modify] https://crrev.com/cf7bcd65f3716fefd0640fdac12ab172db587a02/chrome/test/media_router/media_router_e2e_browsertest.cc
[modify] https://crrev.com/cf7bcd65f3716fefd0640fdac12ab172db587a02/content/browser/background_fetch/background_fetch_context.cc
[modify] https://crrev.com/cf7bcd65f3716fefd0640fdac12ab172db587a02/content/browser/background_fetch/background_fetch_context.h
[modify] https://crrev.com/cf7bcd65f3716fefd0640fdac12ab172db587a02/content/browser/background_fetch/background_fetch_service_impl.cc
[modify] https://crrev.com/cf7bcd65f3716fefd0640fdac12ab172db587a02/content/browser/background_fetch/background_fetch_service_impl.h
[modify] https://crrev.com/cf7bcd65f3716fefd0640fdac12ab172db587a02/content/browser/background_sync/background_sync_service_impl.cc
[modify] https://crrev.com/cf7bcd65f3716fefd0640fdac12ab172db587a02/content/browser/background_sync/background_sync_service_impl.h
[modify] https://crrev.com/cf7bcd65f3716fefd0640fdac12ab172db587a02/content/browser/background_sync/background_sync_service_impl_unittest.cc
[modify] https://crrev.com/cf7bcd65f3716fefd0640fdac12ab172db587a02/content/browser/bluetooth/web_bluetooth_service_impl.cc
[modify] https://crrev.com/cf7bcd65f3716fefd0640fdac12ab172db587a02/content/browser/bluetooth/web_bluetooth_service_impl.h
[modify] https://crrev.com/cf7bcd65f3716fefd0640fdac12ab172db587a02/content/browser/hyphenation/hyphenation_impl.cc
[modify] https://crrev.com/cf7bcd65f3716fefd0640fdac12ab172db587a02/content/browser/hyphenation/hyphenation_impl.h
[modify] https://crrev.com/cf7bcd65f3716fefd0640fdac12ab172db587a02/content/browser/installedapp/installed_app_provider_impl_default.cc
[modify] https://crrev.com/cf7bcd65f3716fefd0640fdac12ab172db587a02/content/browser/installedapp/installed_app_provider_impl_default.h
[modify] https://crrev.com/cf7bcd65f3716fefd0640fdac12ab172db587a02/content/browser/keyboard_lock/keyboard_lock_service_impl.cc
[modify] https://crrev.com/cf7bcd65f3716fefd0640fdac12ab172db587a02/content/browser/keyboard_lock/keyboard_lock_service_impl.h
[modify] https://crrev.com/cf7bcd65f3716fefd0640fdac12ab172db587a02/content/browser/mime_registry_impl.cc
[modify] https://crrev.com/cf7bcd65f3716fefd0640fdac12ab172db587a02/content/browser/mime_registry_impl.h
[modify] https://crrev.com/cf7bcd65f3716fefd0640fdac12ab172db587a02/content/browser/notifications/blink_notification_service_impl.cc
[modify] https://crrev.com/cf7bcd65f3716fefd0640fdac12ab172db587a02/content/browser/notifications/blink_notification_service_impl.h
[modify] https://crrev.com/cf7bcd65f3716fefd0640fdac12ab172db587a02/content/browser/payments/payment_manager.cc
[modify] https://crrev.com/cf7bcd65f3716fefd0640fdac12ab172db587a02/content/browser/payments/payment_manager.h
[modify] https://crrev.com/cf7bcd65f3716fefd0640fdac12ab172db587a02/content/browser/permissions/permission_service_impl.cc
[modify] https://crrev.com/cf7bcd65f3716fefd0640fdac12ab172db587a02/content/browser/permissions/permission_service_impl.h
[modify] https://crrev.com/cf7bcd65f3716fefd0640fdac12ab172db587a02/content/browser/presentation/presentation_service_impl.cc
[modify] https://crrev.com/cf7bcd65f3716fefd0640fdac12ab172db587a02/content/browser/presentation/presentation_service_impl.h
[modify] https://crrev.com/cf7bcd65f3716fefd0640fdac12ab172db587a02/content/browser/presentation/presentation_service_impl_unittest.cc
[modify] https://crrev.com/cf7bcd65f3716fefd0640fdac12ab172db587a02/content/public/browser/presentation_service_delegate.h
[modify] https://crrev.com/cf7bcd65f3716fefd0640fdac12ab172db587a02/content/renderer/manifest/manifest_manager.cc
[modify] https://crrev.com/cf7bcd65f3716fefd0640fdac12ab172db587a02/content/renderer/manifest/manifest_manager.h
[modify] https://crrev.com/cf7bcd65f3716fefd0640fdac12ab172db587a02/content/renderer/presentation/presentation_connection_proxy.cc
[modify] https://crrev.com/cf7bcd65f3716fefd0640fdac12ab172db587a02/content/renderer/presentation/presentation_connection_proxy.h
[modify] https://crrev.com/cf7bcd65f3716fefd0640fdac12ab172db587a02/content/renderer/presentation/presentation_dispatcher_unittest.cc
[modify] https://crrev.com/cf7bcd65f3716fefd0640fdac12ab172db587a02/third_party/WebKit/Source/modules/app_banner/AppBannerController.cpp
[modify] https://crrev.com/cf7bcd65f3716fefd0640fdac12ab172db587a02/third_party/WebKit/Source/modules/app_banner/AppBannerController.h
[modify] https://crrev.com/cf7bcd65f3716fefd0640fdac12ab172db587a02/third_party/WebKit/Source/modules/document_metadata/CopylessPasteServer.cpp
[modify] https://crrev.com/cf7bcd65f3716fefd0640fdac12ab172db587a02/third_party/WebKit/Source/modules/document_metadata/CopylessPasteServer.h
[modify] https://crrev.com/cf7bcd65f3716fefd0640fdac12ab172db587a02/third_party/WebKit/Source/platform/network/mime/MockMimeRegistry.h
[modify] https://crrev.com/cf7bcd65f3716fefd0640fdac12ab172db587a02/third_party/WebKit/public/BUILD.gn

http://crrev.com/c/683225 also introduced a bunch of such TODOs (added this bug to the commit message locally, but forgot the fact that `git cl upload` does not update Gerrit's commit message :/)
Project Member

Comment 5 by bugdroid1@chromium.org, Nov 28 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/403b66267eb4ce35c8cbfd529df473548c574bc1

commit 403b66267eb4ce35c8cbfd529df473548c574bc1
Author: jdoerrie <jdoerrie@chromium.org>
Date: Tue Nov 28 11:11:20 2017

[u2f] Clean Up U2F Device

This change improves U2fDevice by:
- Migrating to base::BindOnce() and OnceCallbacks
- Using more appropriate datastructures
- Removing dead code
- Fixing #includes to be absolute

Bug: 763303, 714018, 730593, 729950
Change-Id: If577c7f5484896a6115af997fade0c51e555df60
Reviewed-on: https://chromium-review.googlesource.com/787451
Commit-Queue: Jan Wilken Dörrie <jdoerrie@chromium.org>
Reviewed-by: Taiju Tsuiki <tzik@chromium.org>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#519650}
[modify] https://crrev.com/403b66267eb4ce35c8cbfd529df473548c574bc1/device/u2f/mock_u2f_device.cc
[modify] https://crrev.com/403b66267eb4ce35c8cbfd529df473548c574bc1/device/u2f/mock_u2f_device.h
[modify] https://crrev.com/403b66267eb4ce35c8cbfd529df473548c574bc1/device/u2f/u2f_ble_discovery.cc
[modify] https://crrev.com/403b66267eb4ce35c8cbfd529df473548c574bc1/device/u2f/u2f_device.cc
[modify] https://crrev.com/403b66267eb4ce35c8cbfd529df473548c574bc1/device/u2f/u2f_device.h
[modify] https://crrev.com/403b66267eb4ce35c8cbfd529df473548c574bc1/device/u2f/u2f_hid_device.cc
[modify] https://crrev.com/403b66267eb4ce35c8cbfd529df473548c574bc1/device/u2f/u2f_hid_device.h
[modify] https://crrev.com/403b66267eb4ce35c8cbfd529df473548c574bc1/device/u2f/u2f_hid_device_unittest.cc
[modify] https://crrev.com/403b66267eb4ce35c8cbfd529df473548c574bc1/device/u2f/u2f_register_unittest.cc
[modify] https://crrev.com/403b66267eb4ce35c8cbfd529df473548c574bc1/device/u2f/u2f_request_unittest.cc
[modify] https://crrev.com/403b66267eb4ce35c8cbfd529df473548c574bc1/device/u2f/u2f_sign_unittest.cc

Project Member

Comment 6 by bugdroid1@chromium.org, Jan 9 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/12916246787938e0850a71cb23c17a27e029799a

commit 12916246787938e0850a71cb23c17a27e029799a
Author: Yannic Bonenberger <contact@yannic-bonenberger.com>
Date: Tue Jan 09 09:52:14 2018

Finish OnceCallback migration in ServiceWorkerVersion

Bug: 755477
Bug: 730593
Change-Id: I9b98b5a01d5ebb5fb8128b2a72d6eb2dc44cbf8f
Reviewed-on: https://chromium-review.googlesource.com/688955
Commit-Queue: Matt Falkenhagen <falken@chromium.org>
Reviewed-by: Josh Karlin <jkarlin@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Peter Beverloo <peter@chromium.org>
Reviewed-by: Matt Falkenhagen <falken@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#527948}
[modify] https://crrev.com/12916246787938e0850a71cb23c17a27e029799a/content/browser/background_sync/background_sync_manager.cc
[modify] https://crrev.com/12916246787938e0850a71cb23c17a27e029799a/content/browser/background_sync/background_sync_manager.h
[modify] https://crrev.com/12916246787938e0850a71cb23c17a27e029799a/content/browser/devtools/protocol/service_worker_handler.cc
[modify] https://crrev.com/12916246787938e0850a71cb23c17a27e029799a/content/browser/notifications/notification_event_dispatcher_impl.cc
[modify] https://crrev.com/12916246787938e0850a71cb23c17a27e029799a/content/browser/service_worker/service_worker_version.cc
[modify] https://crrev.com/12916246787938e0850a71cb23c17a27e029799a/content/browser/service_worker/service_worker_version.h
[modify] https://crrev.com/12916246787938e0850a71cb23c17a27e029799a/content/test/test_background_sync_manager.cc
[modify] https://crrev.com/12916246787938e0850a71cb23c17a27e029799a/content/test/test_background_sync_manager.h

Project Member

Comment 7 by bugdroid1@chromium.org, Jan 12 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/157d58a3cfca1964b1bf8d3847cbf58da704dcfb

commit 157d58a3cfca1964b1bf8d3847cbf58da704dcfb
Author: Yannic Bonenberger <contact@yannic-bonenberger.com>
Date: Fri Jan 12 09:55:58 2018

Simplify interface of ServiceWorkerVersion::RunAfterStartWorker

This CL modifies the interface of RunAfterStartWorker to take only
one StatusCallback instead of a task closure and an error callback.

Bug: 730593
Change-Id: I4e6578e439a8e96f86869e8737ec62e8e155cf36
Reviewed-on: https://chromium-review.googlesource.com/846139
Commit-Queue: Yannic Bonenberger <contact@yannic-bonenberger.com>
Reviewed-by: Matt Falkenhagen <falken@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#528915}
[modify] https://crrev.com/157d58a3cfca1964b1bf8d3847cbf58da704dcfb/content/browser/background_fetch/background_fetch_event_dispatcher.cc
[modify] https://crrev.com/157d58a3cfca1964b1bf8d3847cbf58da704dcfb/content/browser/background_fetch/background_fetch_event_dispatcher.h
[modify] https://crrev.com/157d58a3cfca1964b1bf8d3847cbf58da704dcfb/content/browser/background_sync/background_sync_manager.cc
[modify] https://crrev.com/157d58a3cfca1964b1bf8d3847cbf58da704dcfb/content/browser/notifications/notification_event_dispatcher_impl.cc
[modify] https://crrev.com/157d58a3cfca1964b1bf8d3847cbf58da704dcfb/content/browser/payments/payment_app_provider_impl.cc
[modify] https://crrev.com/157d58a3cfca1964b1bf8d3847cbf58da704dcfb/content/browser/push_messaging/push_messaging_router.cc
[modify] https://crrev.com/157d58a3cfca1964b1bf8d3847cbf58da704dcfb/content/browser/push_messaging/push_messaging_router.h
[modify] https://crrev.com/157d58a3cfca1964b1bf8d3847cbf58da704dcfb/content/browser/service_worker/service_worker_browsertest.cc
[modify] https://crrev.com/157d58a3cfca1964b1bf8d3847cbf58da704dcfb/content/browser/service_worker/service_worker_context_wrapper.cc
[modify] https://crrev.com/157d58a3cfca1964b1bf8d3847cbf58da704dcfb/content/browser/service_worker/service_worker_dispatcher_host.cc
[modify] https://crrev.com/157d58a3cfca1964b1bf8d3847cbf58da704dcfb/content/browser/service_worker/service_worker_dispatcher_host.h
[modify] https://crrev.com/157d58a3cfca1964b1bf8d3847cbf58da704dcfb/content/browser/service_worker/service_worker_dispatcher_host_unittest.cc
[modify] https://crrev.com/157d58a3cfca1964b1bf8d3847cbf58da704dcfb/content/browser/service_worker/service_worker_fetch_dispatcher.cc
[modify] https://crrev.com/157d58a3cfca1964b1bf8d3847cbf58da704dcfb/content/browser/service_worker/service_worker_fetch_dispatcher.h
[modify] https://crrev.com/157d58a3cfca1964b1bf8d3847cbf58da704dcfb/content/browser/service_worker/service_worker_register_job.cc
[modify] https://crrev.com/157d58a3cfca1964b1bf8d3847cbf58da704dcfb/content/browser/service_worker/service_worker_register_job.h
[modify] https://crrev.com/157d58a3cfca1964b1bf8d3847cbf58da704dcfb/content/browser/service_worker/service_worker_registration.cc
[modify] https://crrev.com/157d58a3cfca1964b1bf8d3847cbf58da704dcfb/content/browser/service_worker/service_worker_registration.h
[modify] https://crrev.com/157d58a3cfca1964b1bf8d3847cbf58da704dcfb/content/browser/service_worker/service_worker_version.cc
[modify] https://crrev.com/157d58a3cfca1964b1bf8d3847cbf58da704dcfb/content/browser/service_worker/service_worker_version.h
[modify] https://crrev.com/157d58a3cfca1964b1bf8d3847cbf58da704dcfb/content/browser/service_worker/service_worker_version_unittest.cc

Project Member

Comment 8 by bugdroid1@chromium.org, Mar 20 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/aed822394c4b7dc30c615bf70db1574aa62de5cd

commit aed822394c4b7dc30c615bf70db1574aa62de5cd
Author: Avi Drissman <avi@chromium.org>
Date: Tue Mar 20 13:36:57 2018

Add a bug link to AdaptCallbackForRepeating().

BUG=730593

Change-Id: I99aba6a46ed01fe3ec3579ee1f6180670f2e6778
Reviewed-on: https://chromium-review.googlesource.com/969109
Reviewed-by: Taiju Tsuiki <tzik@chromium.org>
Commit-Queue: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#544345}
[modify] https://crrev.com/aed822394c4b7dc30c615bf70db1574aa62de5cd/base/callback_helpers.h

Project Member

Comment 9 by bugdroid1@chromium.org, May 3 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6a122884e44b7592dcad6c6ffe3fc80fba7b2b2f

commit 6a122884e44b7592dcad6c6ffe3fc80fba7b2b2f
Author: Victor Costan <pwnall@chromium.org>
Date: Thu May 03 01:17:41 2018

ServiceWorker: Remove AdaptCallbackForRepeating.

base::AdaptCallbackForRepeating was introduced to help migrate from
base::Callback to base::OnceCallback / base::RepeatingCallback. However,
the methods used by ServiceWorkerContextCore have been converted to take
base::OnceCallback, so the adapter isn't needed anymore.

Bug: 730593
Change-Id: I6eb27da059494075d457d3a3609faf80ca7087a2
Reviewed-on: https://chromium-review.googlesource.com/1040986
Reviewed-by: Matt Falkenhagen <falken@chromium.org>
Commit-Queue: Victor Costan <pwnall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#555643}
[modify] https://crrev.com/6a122884e44b7592dcad6c6ffe3fc80fba7b2b2f/content/browser/service_worker/service_worker_context_core.cc

Project Member

Comment 10 by bugdroid1@chromium.org, May 26 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/130902aad4e06d6d25aa1bcb2de6d564584adf22

commit 130902aad4e06d6d25aa1bcb2de6d564584adf22
Author: Bence Béky <bnc@chromium.org>
Date: Sat May 26 00:36:01 2018

Store callback in DhcpPacFileFetcherChromeos.

The //net idiom for async calls is that they take a callback, and either
* return ERR_IO_PENDING, and later call this callback (unless
  cancelled), or
* return something other than ERR_IO_PENDING and never call the callback.

DhcpPacFileFetcherChromeos has a Fetch() method which always returns
asynchronously.  This class creates a PacFileFetcher, and in its
ContinueFetch() method calls Fetch() on this PacFileFetcher.
PacFileFetcher::Fetch() can return synchronously or asynchronously.  In
the former case, DhcpPacFileFetcherChromeos must call the callback, in
the latter case, PacFileFetcher will.  Currently this is implemented by
calling AdaptCallbackForRepeating() in
DhcpPacFileFetcherChromeos::ContinueFetch(), which turns the
OnceCallback into a RepeatingCallback so that it can be passed in to
PacFileFetcher::Fetch() while also retained.  However,
AdaptCallbackForRepeating() is not meant to be used other than
temporarily for transitioning from Callback to OnceCallback (which is
exactly what we are doing).

This CL makes DhcpPacFileFetcherChromeos save the callback in a private
member, and passes in a bound method to PacFileFetcher::Fetch().  This
way there is no need to use AdaptCallbackForRepeating().

If DhcpPacFileFetcherChromeos::Fetch() is cancelled (Cancel() is called
or the class instance is destroyed), then PacFileFetcher is
appropriately notified and/or destroyed, so the (invalidated) callback
is never run.

This is a follow-up to
https://crrev.com/c/1066291/9/chromeos/network/dhcp_pac_file_fetcher_chromeos.cc#94.

Bug: 730593, 807724
Change-Id: Ic9597114bf54893a98990d56bdb1682cbf4aef5f
Reviewed-on: https://chromium-review.googlesource.com/1073192
Commit-Queue: Bence Béky <bnc@chromium.org>
Reviewed-by: Steven Bennetts <stevenjb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#562083}
[modify] https://crrev.com/130902aad4e06d6d25aa1bcb2de6d564584adf22/chromeos/network/dhcp_pac_file_fetcher_chromeos.cc
[modify] https://crrev.com/130902aad4e06d6d25aa1bcb2de6d564584adf22/chromeos/network/dhcp_pac_file_fetcher_chromeos.h

after #10, I got this crash

[8209:8240:0718/112336.110499:FATAL:dhcp_pac_file_fetcher_chromeos.cc(55)] Check failed: !callback_. 
#0 0x5bb0010fbc0c base::debug::StackTrace::StackTrace()
#1 0x5bb00107dd80 logging::LogMessage::~LogMessage()
#2 0x5bb001a4e597 chromeos::DhcpPacFileFetcherChromeos::Fetch()
#3 0x5bb0017bd056 net::PacFileDecider::DoFetchPacScript()
#4 0x5bb0017bc681 net::PacFileDecider::DoLoop()
#5 0x5bb0017bd592 net::PacFileDecider::OnWaitTimerFired()
#6 0x5bb0010d7bd3 base::Timer::RunScheduledTask()
#7 0x5bb00110fec9 base::debug::TaskAnnotator::RunTask()
#8 0x5bb001083932 base::MessageLoop::RunTask()
#9 0x5bb0010840ca base::MessageLoop::DoDelayedWork()
#10 0x5bb00110c6dd base::MessagePumpLibevent::Run()
#11 0x5bb0010a3075 base::RunLoop::Run()
#12 0x5bafff5ab531 content::BrowserProcessSubThread::IOThreadRun()
#13 0x5bb0010d4f7c base::Thread::ThreadMain()
#14 0x5bb00110821d base::(anonymous namespace)::ThreadFunc()
#15 0x7f2e3112b2b8 <unknown>
#16 0x7f2e305defad clone

Received signal 6
#0 0x5bb0010fbc0c base::debug::StackTrace::StackTrace()
#1 0x5bb0010fb771 base::debug::(anonymous namespace)::StackDumpSignalHandler()
#2 0x7f2e311352e0 <unknown>
#3 0x7f2e3051bdd2 gsignal
#4 0x7f2e3051dbf6 abort
#5 0x5bb0010fa505 base::debug::BreakDebugger()
#6 0x5bb00107e1b6 logging::LogMessage::~LogMessage()
#7 0x5bb001a4e597 chromeos::DhcpPacFileFetcherChromeos::Fetch()
#8 0x5bb0017bd056 net::PacFileDecider::DoFetchPacScript()
#9 0x5bb0017bc681 net::PacFileDecider::DoLoop()
#10 0x5bb0017bd592 net::PacFileDecider::OnWaitTimerFired()
#11 0x5bb0010d7bd3 base::Timer::RunScheduledTask()
#12 0x5bb00110fec9 base::debug::TaskAnnotator::RunTask()
#13 0x5bb001083932 base::MessageLoop::RunTask()
#14 0x5bb0010840ca base::MessageLoop::DoDelayedWork()
#15 0x5bb00110c6dd base::MessagePumpLibevent::Run()
#16 0x5bb0010a3075 base::RunLoop::Run()
#17 0x5bafff5ab531 content::BrowserProcessSubThread::IOThreadRun()
#18 0x5bb0010d4f7c base::Thread::ThreadMain()
#19 0x5bb00110821d base::(anonymous namespace)::ThreadFunc()
#20 0x7f2e3112b2b8 <unknown>
#21 0x7f2e305defad clone
  r8: 00007f2e3088e8e0  r9: 00007f2e2c798700 r10: 0000000000000008 r11: 0000000000000206
 r12: 00007f2e2c797069 r13: 00007f2e2c797658 r14: 00007f2e2c7970a0 r15: 00007f2e2c797068
  di: 0000000000002011  si: 0000000000002030  bp: 00007f2e2c797030  bx: 00007f2e2c7970a0
  dx: 0000000000000006  ax: 0000000000000000  cx: 00007f2e3051bdd2  sp: 00007f2e2c796f08
  ip: 00007f2e3051bdd2 efl: 0000000000000206 cgf: 0000000000000033 erf: 0000000000000000
 trp: 0000000000000000 msk: 0000000000000000 cr2: 0000000000000000
[end of stack trace]
Calling _exit(1). Core file will not be generated.


I tried to print previous call to set the |callback_|
[8209:8240:0718/112331.930194:ERROR:dhcp_pac_file_fetcher_chromeos.cc(55)]
#0 0x5bb0010fbc0c base::debug::StackTrace::StackTrace()
#1 0x5bb001a4e4fa chromeos::DhcpPacFileFetcherChromeos::Fetch()
#2 0x5bb0017bd056 net::PacFileDecider::DoFetchPacScript()
#3 0x5bb0017bc681 net::PacFileDecider::DoLoop()
#4 0x5bb0017bc374 net::PacFileDecider::Start()
#5 0x5bb0016a6f85 net::ProxyResolutionService::InitProxyResolver::DoLoop()
#6 0x5bb0016a4c70 net::ProxyResolutionService::InitializeUsingLastFetchedConfig()
#7 0x5bb0016a628d net::ProxyResolutionService::OnProxyConfigChanged()
#8 0x5bb0016a39c5 net::ProxyResolutionService::ResolveProxyHelper()
#9 0x5bb0016a389a net::ProxyResolutionService::ResolveProxy()
#10 0x5bb001689245 net::HttpStreamFactory::JobController::DoResolveProxy()
#11 0x5bb001686fe0 net::HttpStreamFactory::JobController::RunLoop()
#12 0x5bb001686f57 net::HttpStreamFactory::JobController::Start()
#13 0x5bb00167f6ce net::HttpStreamFactory::RequestStreamInternal()
#14 0x5bb00167f552 net::HttpStreamFactory::RequestStream()
#15 0x5bb00167a789 net::HttpNetworkTransaction::DoCreateStream()
#16 0x5bb00167876c net::HttpNetworkTransaction::DoLoop()
#17 0x5bb001677f18 net::HttpNetworkTransaction::Start()
#18 0x5bb002583cc5 network::ThrottlingNetworkTransaction::Start()
#19 0x5bb00166a04e net::HttpCache::Transaction::DoSendRequest()
#20 0x5bb001664bcb net::HttpCache::Transaction::DoLoop()
#21 0x5bb001661b7a net::HttpCache::OnProcessQueuedTransactions()
#22 0x5bb00110fec9 base::debug::TaskAnnotator::RunTask()
#23 0x5bb001083932 base::MessageLoop::RunTask()
#24 0x5bb001083e77 base::MessageLoop::DoWork()
#25 0x5bb00110c809 base::MessagePumpLibevent::Run()
#26 0x5bb0010a3075 base::RunLoop::Run()
#27 0x5bafff5ab531 content::BrowserProcessSubThread::IOThreadRun()
#28 0x5bb0010d4f7c base::Thread::ThreadMain()
#29 0x5bb00110821d base::(anonymous namespace)::ThreadFunc()
#30 0x7f2e3112b2b8 <unknown>
#31 0x7f2e305defad clone


Sign in to add a comment