Commit e78baea1 authored by Reilly Grant's avatar Reilly Grant Committed by Commit Bot

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: default avatarTrent Apted <tapted@chromium.org>
Cr-Commit-Position: refs/heads/master@{#719407}
parent bc7dbccc
...@@ -146,8 +146,8 @@ class PlatformAppPathLauncher ...@@ -146,8 +146,8 @@ class PlatformAppPathLauncher
is_directory_collector_.CollectForEntriesPaths( is_directory_collector_.CollectForEntriesPaths(
entry_paths_, entry_paths_,
base::Bind(&PlatformAppPathLauncher::OnAreDirectoriesCollected, this, base::BindOnce(&PlatformAppPathLauncher::OnAreDirectoriesCollected,
HasFileSystemWritePermission(app))); this, HasFileSystemWritePermission(app)));
} }
void LaunchWithHandler(const std::string& handler_id) { void LaunchWithHandler(const std::string& handler_id) {
...@@ -189,9 +189,9 @@ class PlatformAppPathLauncher ...@@ -189,9 +189,9 @@ class PlatformAppPathLauncher
void OnFilesValid(std::unique_ptr<std::set<base::FilePath>> directory_paths) { void OnFilesValid(std::unique_ptr<std::set<base::FilePath>> directory_paths) {
mime_type_collector_.CollectForLocalPaths( mime_type_collector_.CollectForLocalPaths(
entry_paths_, entry_paths_,
base::Bind( base::BindOnce(
&PlatformAppPathLauncher::OnAreDirectoriesAndMimeTypesCollected, &PlatformAppPathLauncher::OnAreDirectoriesAndMimeTypesCollected,
this, base::Passed(std::move(directory_paths)))); this, std::move(directory_paths)));
} }
void OnFilesInvalid(const base::FilePath& /* error_path */) { void OnFilesInvalid(const base::FilePath& /* error_path */) {
...@@ -224,9 +224,9 @@ class PlatformAppPathLauncher ...@@ -224,9 +224,9 @@ class PlatformAppPathLauncher
directory_paths.get(); directory_paths.get();
PrepareFilesForWritableApp( PrepareFilesForWritableApp(
entry_paths_, context_, *directory_paths_ptr, entry_paths_, context_, *directory_paths_ptr,
base::Bind(&PlatformAppPathLauncher::OnFilesValid, this, base::BindOnce(&PlatformAppPathLauncher::OnFilesValid, this,
base::Passed(std::move(directory_paths))), std::move(directory_paths)),
base::Bind(&PlatformAppPathLauncher::OnFilesInvalid, this)); base::BindOnce(&PlatformAppPathLauncher::OnFilesInvalid, this));
return; return;
} }
...@@ -295,8 +295,8 @@ class PlatformAppPathLauncher ...@@ -295,8 +295,8 @@ class PlatformAppPathLauncher
if (queue->ShouldEnqueueTask(context_, app)) { if (queue->ShouldEnqueueTask(context_, app)) {
queue->AddPendingTask( queue->AddPendingTask(
context_id, context_id,
base::Bind(&PlatformAppPathLauncher::GrantAccessToFilesAndLaunch, base::BindOnce(&PlatformAppPathLauncher::GrantAccessToFilesAndLaunch,
this)); this));
return; return;
} }
......
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