Commit ac0af928 authored by Anand K. Mistry's avatar Anand K. Mistry Committed by Commit Bot

Convert Bind -> Bind{Once,Repeating} where possible in file_manager

Bug: 875700
Change-Id: I81cd3b54b1119e9475ee4653efcd4817d4ea4a39
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1943786Reviewed-by: default avatarAustin Tankiang <austinct@chromium.org>
Commit-Queue: Anand Mistry <amistry@chromium.org>
Cr-Commit-Position: refs/heads/master@{#720725}
parent f5813c27
......@@ -419,9 +419,9 @@ bool ExecuteFileTask(Profile* profile,
extensions::app_file_handler_util::MimeTypeCollector* mime_collector =
new extensions::app_file_handler_util::MimeTypeCollector(profile);
mime_collector->CollectForURLs(
file_urls, base::Bind(&ExecuteByArcAfterMimeTypesCollected, profile,
task, file_urls, base::Passed(std::move(done)),
base::Owned(mime_collector)));
file_urls, base::BindOnce(&ExecuteByArcAfterMimeTypesCollected, profile,
task, file_urls, std::move(done),
base::Owned(mime_collector)));
return true;
}
......
......@@ -244,8 +244,7 @@ void IsNonNativeLocalPathDirectory(Profile* profile,
util::CheckIfDirectoryExists(
GetFileSystemContextForExtensionId(profile, kFileManagerAppId), path,
base::Bind(&BoolCallbackAsFileErrorCallback,
base::Passed(std::move(callback))));
base::BindOnce(&BoolCallbackAsFileErrorCallback, std::move(callback)));
}
void PrepareNonNativeLocalFileForWritableApp(
......
......@@ -133,7 +133,7 @@ void OpenFile(Profile* profile,
const platform_util::OpenOperationCallback& callback) {
extensions::app_file_handler_util::GetMimeTypeForLocalPath(
profile, path,
base::Bind(&OpenFileWithMimeType, profile, path, url, callback));
base::BindOnce(&OpenFileWithMimeType, profile, path, url, callback));
}
void OpenItemWithMetadata(Profile* profile,
......@@ -206,8 +206,8 @@ void OpenItem(Profile* profile,
GetMetadataForPath(
GetFileSystemContextForExtensionId(profile, kFileManagerAppId), file_path,
storage::FileSystemOperation::GET_METADATA_FIELD_IS_DIRECTORY,
base::Bind(&OpenItemWithMetadata, profile, file_path, url, expected_type,
callback));
base::BindOnce(&OpenItemWithMetadata, profile, file_path, url,
expected_type, callback));
}
void ShowItemInFolder(Profile* profile,
......
......@@ -106,7 +106,7 @@ void OpenNewTab(Profile* profile, const GURL& url) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
// Check the validity of the pointer so that the closure from
// base::Bind(&OpenNewTab, profile) can be passed between threads.
// base::BindOnce(&OpenNewTab, profile) can be passed between threads.
if (!g_browser_process->profile_manager()->IsValidProfile(profile))
return;
......
......@@ -69,8 +69,8 @@ void GetMetadataOnIOThread(const base::FilePath& path,
DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
context->operation_runner()->GetMetadata(
url, storage::FileSystemOperation::GET_METADATA_FIELD_SIZE,
base::Bind(&ComputeSpaceNeedToBeFreedAfterGetMetadata, path,
base::Passed(std::move(callback))));
base::BindOnce(&ComputeSpaceNeedToBeFreedAfterGetMetadata, path,
std::move(callback)));
}
// Computes the size of space that need to be __additionally__ made available
......
......@@ -559,12 +559,12 @@ void VolumeManager::Initialize() {
pref_change_registrar_.Init(profile_->GetPrefs());
pref_change_registrar_.Add(
prefs::kExternalStorageDisabled,
base::Bind(&VolumeManager::OnExternalStorageDisabledChanged,
weak_ptr_factory_.GetWeakPtr()));
base::BindRepeating(&VolumeManager::OnExternalStorageDisabledChanged,
weak_ptr_factory_.GetWeakPtr()));
pref_change_registrar_.Add(
prefs::kExternalStorageReadOnly,
base::Bind(&VolumeManager::OnExternalStorageReadOnlyChanged,
weak_ptr_factory_.GetWeakPtr()));
base::BindRepeating(&VolumeManager::OnExternalStorageReadOnlyChanged,
weak_ptr_factory_.GetWeakPtr()));
// Subscribe to storage monitor for MTP notifications.
if (storage_monitor::StorageMonitor::GetInstance()) {
......
......@@ -210,8 +210,8 @@ class VolumeManagerTest : public testing::Test {
power_manager_client,
disk_manager,
file_system_provider_service_.get(),
base::Bind(&ProfileEnvironment::GetFakeMtpStorageInfo,
base::Unretained(this)))),
base::BindRepeating(&ProfileEnvironment::GetFakeMtpStorageInfo,
base::Unretained(this)))),
account_id_(
AccountId::FromUserEmailGaiaId(profile_->GetProfileUserName(),
"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