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,8 +419,8 @@ bool ExecuteFileTask(Profile* profile, ...@@ -419,8 +419,8 @@ bool ExecuteFileTask(Profile* profile,
extensions::app_file_handler_util::MimeTypeCollector* mime_collector = extensions::app_file_handler_util::MimeTypeCollector* mime_collector =
new extensions::app_file_handler_util::MimeTypeCollector(profile); new extensions::app_file_handler_util::MimeTypeCollector(profile);
mime_collector->CollectForURLs( mime_collector->CollectForURLs(
file_urls, base::Bind(&ExecuteByArcAfterMimeTypesCollected, profile, file_urls, base::BindOnce(&ExecuteByArcAfterMimeTypesCollected, profile,
task, file_urls, base::Passed(std::move(done)), task, file_urls, std::move(done),
base::Owned(mime_collector))); base::Owned(mime_collector)));
return true; return true;
} }
......
...@@ -244,8 +244,7 @@ void IsNonNativeLocalPathDirectory(Profile* profile, ...@@ -244,8 +244,7 @@ void IsNonNativeLocalPathDirectory(Profile* profile,
util::CheckIfDirectoryExists( util::CheckIfDirectoryExists(
GetFileSystemContextForExtensionId(profile, kFileManagerAppId), path, GetFileSystemContextForExtensionId(profile, kFileManagerAppId), path,
base::Bind(&BoolCallbackAsFileErrorCallback, base::BindOnce(&BoolCallbackAsFileErrorCallback, std::move(callback)));
base::Passed(std::move(callback))));
} }
void PrepareNonNativeLocalFileForWritableApp( void PrepareNonNativeLocalFileForWritableApp(
......
...@@ -133,7 +133,7 @@ void OpenFile(Profile* profile, ...@@ -133,7 +133,7 @@ void OpenFile(Profile* profile,
const platform_util::OpenOperationCallback& callback) { const platform_util::OpenOperationCallback& callback) {
extensions::app_file_handler_util::GetMimeTypeForLocalPath( extensions::app_file_handler_util::GetMimeTypeForLocalPath(
profile, path, profile, path,
base::Bind(&OpenFileWithMimeType, profile, path, url, callback)); base::BindOnce(&OpenFileWithMimeType, profile, path, url, callback));
} }
void OpenItemWithMetadata(Profile* profile, void OpenItemWithMetadata(Profile* profile,
...@@ -206,8 +206,8 @@ void OpenItem(Profile* profile, ...@@ -206,8 +206,8 @@ void OpenItem(Profile* profile,
GetMetadataForPath( GetMetadataForPath(
GetFileSystemContextForExtensionId(profile, kFileManagerAppId), file_path, GetFileSystemContextForExtensionId(profile, kFileManagerAppId), file_path,
storage::FileSystemOperation::GET_METADATA_FIELD_IS_DIRECTORY, storage::FileSystemOperation::GET_METADATA_FIELD_IS_DIRECTORY,
base::Bind(&OpenItemWithMetadata, profile, file_path, url, expected_type, base::BindOnce(&OpenItemWithMetadata, profile, file_path, url,
callback)); expected_type, callback));
} }
void ShowItemInFolder(Profile* profile, void ShowItemInFolder(Profile* profile,
......
...@@ -106,7 +106,7 @@ void OpenNewTab(Profile* profile, const GURL& url) { ...@@ -106,7 +106,7 @@ void OpenNewTab(Profile* profile, const GURL& url) {
DCHECK_CURRENTLY_ON(BrowserThread::UI); DCHECK_CURRENTLY_ON(BrowserThread::UI);
// Check the validity of the pointer so that the closure from // 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)) if (!g_browser_process->profile_manager()->IsValidProfile(profile))
return; return;
......
...@@ -69,8 +69,8 @@ void GetMetadataOnIOThread(const base::FilePath& path, ...@@ -69,8 +69,8 @@ void GetMetadataOnIOThread(const base::FilePath& path,
DCHECK_CURRENTLY_ON(content::BrowserThread::IO); DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
context->operation_runner()->GetMetadata( context->operation_runner()->GetMetadata(
url, storage::FileSystemOperation::GET_METADATA_FIELD_SIZE, url, storage::FileSystemOperation::GET_METADATA_FIELD_SIZE,
base::Bind(&ComputeSpaceNeedToBeFreedAfterGetMetadata, path, base::BindOnce(&ComputeSpaceNeedToBeFreedAfterGetMetadata, path,
base::Passed(std::move(callback)))); std::move(callback)));
} }
// Computes the size of space that need to be __additionally__ made available // Computes the size of space that need to be __additionally__ made available
......
...@@ -559,11 +559,11 @@ void VolumeManager::Initialize() { ...@@ -559,11 +559,11 @@ void VolumeManager::Initialize() {
pref_change_registrar_.Init(profile_->GetPrefs()); pref_change_registrar_.Init(profile_->GetPrefs());
pref_change_registrar_.Add( pref_change_registrar_.Add(
prefs::kExternalStorageDisabled, prefs::kExternalStorageDisabled,
base::Bind(&VolumeManager::OnExternalStorageDisabledChanged, base::BindRepeating(&VolumeManager::OnExternalStorageDisabledChanged,
weak_ptr_factory_.GetWeakPtr())); weak_ptr_factory_.GetWeakPtr()));
pref_change_registrar_.Add( pref_change_registrar_.Add(
prefs::kExternalStorageReadOnly, prefs::kExternalStorageReadOnly,
base::Bind(&VolumeManager::OnExternalStorageReadOnlyChanged, base::BindRepeating(&VolumeManager::OnExternalStorageReadOnlyChanged,
weak_ptr_factory_.GetWeakPtr())); weak_ptr_factory_.GetWeakPtr()));
// Subscribe to storage monitor for MTP notifications. // Subscribe to storage monitor for MTP notifications.
......
...@@ -210,7 +210,7 @@ class VolumeManagerTest : public testing::Test { ...@@ -210,7 +210,7 @@ class VolumeManagerTest : public testing::Test {
power_manager_client, power_manager_client,
disk_manager, disk_manager,
file_system_provider_service_.get(), file_system_provider_service_.get(),
base::Bind(&ProfileEnvironment::GetFakeMtpStorageInfo, base::BindRepeating(&ProfileEnvironment::GetFakeMtpStorageInfo,
base::Unretained(this)))), base::Unretained(this)))),
account_id_( account_id_(
AccountId::FromUserEmailGaiaId(profile_->GetProfileUserName(), AccountId::FromUserEmailGaiaId(profile_->GetProfileUserName(),
......
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