Skip to content
Permalink
Browse files

Convert base::Bind and base::Callback in apps to Once/Repeating

Bug: 1007632
Change-Id: Ic571ca1cb670e8387ff64b3e6f84aee3f6679a4f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1931152
Auto-Submit: Reilly Grant <reillyg@chromium.org>
Commit-Queue: Trent Apted <tapted@chromium.org>
Reviewed-by: Trent Apted <tapted@chromium.org>
Cr-Commit-Position: refs/heads/master@{#719407}
  • Loading branch information
reillyeon authored and Commit Bot committed Nov 26, 2019
1 parent bc7dbcc commit e78baea1dccb0fa859c87e0676f727fbd646793e
Showing with 9 additions and 9 deletions.
  1. +9 −9 apps/launcher.cc
@@ -146,8 +146,8 @@ class PlatformAppPathLauncher

is_directory_collector_.CollectForEntriesPaths(
entry_paths_,
base::Bind(&PlatformAppPathLauncher::OnAreDirectoriesCollected, this,
HasFileSystemWritePermission(app)));
base::BindOnce(&PlatformAppPathLauncher::OnAreDirectoriesCollected,
this, HasFileSystemWritePermission(app)));
}

void LaunchWithHandler(const std::string& handler_id) {
@@ -189,9 +189,9 @@ class PlatformAppPathLauncher
void OnFilesValid(std::unique_ptr<std::set<base::FilePath>> directory_paths) {
mime_type_collector_.CollectForLocalPaths(
entry_paths_,
base::Bind(
base::BindOnce(
&PlatformAppPathLauncher::OnAreDirectoriesAndMimeTypesCollected,
this, base::Passed(std::move(directory_paths))));
this, std::move(directory_paths)));
}

void OnFilesInvalid(const base::FilePath& /* error_path */) {
@@ -224,9 +224,9 @@ class PlatformAppPathLauncher
directory_paths.get();
PrepareFilesForWritableApp(
entry_paths_, context_, *directory_paths_ptr,
base::Bind(&PlatformAppPathLauncher::OnFilesValid, this,
base::Passed(std::move(directory_paths))),
base::Bind(&PlatformAppPathLauncher::OnFilesInvalid, this));
base::BindOnce(&PlatformAppPathLauncher::OnFilesValid, this,
std::move(directory_paths)),
base::BindOnce(&PlatformAppPathLauncher::OnFilesInvalid, this));
return;
}

@@ -295,8 +295,8 @@ class PlatformAppPathLauncher
if (queue->ShouldEnqueueTask(context_, app)) {
queue->AddPendingTask(
context_id,
base::Bind(&PlatformAppPathLauncher::GrantAccessToFilesAndLaunch,
this));
base::BindOnce(&PlatformAppPathLauncher::GrantAccessToFilesAndLaunch,
this));
return;
}

0 comments on commit e78baea

Please sign in to comment.
You can’t perform that action at this time.