Commit 9a832e18 authored by Jeff Yoon's avatar Jeff Yoon Committed by Commit Bot

[ios] ios/components base::Bind to Once/Repeating

Migrate base::Bind calls in ios/components to base::BindOnce or
base::BindRepeating as part of code health improvements

Bug: 1007793
Change-Id: Ib25fed1c909c8d72628214a55bbd2d6213d42d08
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2236281Reviewed-by: default avatarSylvain Defresne <sdefresne@chromium.org>
Commit-Queue: Jeff Yoon <jeffyoon@chromium.org>
Cr-Commit-Position: refs/heads/master@{#776544}
parent f82bb4b4
...@@ -28,8 +28,8 @@ const char kCommandPrefix[] = "blockingPage"; ...@@ -28,8 +28,8 @@ const char kCommandPrefix[] = "blockingPage";
IOSBlockingPageTabHelper::IOSBlockingPageTabHelper(web::WebState* web_state) IOSBlockingPageTabHelper::IOSBlockingPageTabHelper(web::WebState* web_state)
: subscription_(nullptr), navigation_id_listener_(web_state, this) { : subscription_(nullptr), navigation_id_listener_(web_state, this) {
auto command_callback = auto command_callback =
base::Bind(&IOSBlockingPageTabHelper::OnBlockingPageCommand, base::BindRepeating(&IOSBlockingPageTabHelper::OnBlockingPageCommand,
weak_factory_.GetWeakPtr()); weak_factory_.GetWeakPtr());
subscription_ = subscription_ =
web_state->AddScriptCommandCallback(command_callback, kCommandPrefix); web_state->AddScriptCommandCallback(command_callback, kCommandPrefix);
} }
......
...@@ -200,8 +200,8 @@ void SyncInternalsMessageHandler::HandleGetAllNodes( ...@@ -200,8 +200,8 @@ void SyncInternalsMessageHandler::HandleGetAllNodes(
syncer::SyncService* service = GetSyncService(); syncer::SyncService* service = GetSyncService();
if (service) { if (service) {
service->GetAllNodesForDebugging( service->GetAllNodesForDebugging(
base::Bind(&SyncInternalsMessageHandler::OnReceivedAllNodes, base::BindOnce(&SyncInternalsMessageHandler::OnReceivedAllNodes,
weak_ptr_factory_.GetWeakPtr(), request_id)); weak_ptr_factory_.GetWeakPtr(), request_id));
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment