Commit 8ed81251 authored by Xida Chen's avatar Xida Chen Committed by Chromium LUCI CQ

[Code health] Convert base::Bind in gallery_watch_manager_unittest.cc

This CL converts three base::Bind to base::BindOnce in this file.
The function that takes the callback is already expecting a
OnceCallback, so converting to base::BindOnce seems to be the right
choice.

Bug: 1152278
Change-Id: I0ed76be834d516ccdcb20200b30f172fa41f385a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2592012Reviewed-by: default avatarTommy Li <tommycli@chromium.org>
Commit-Queue: Xida Chen <xidachen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#837150}
parent 73c16eba
......@@ -159,10 +159,8 @@ class GalleryWatchManagerTest : public GalleryWatchManagerObserver,
void AddAndConfirmWatch(MediaGalleryPrefId gallery_id) {
base::RunLoop loop;
manager()->AddWatch(profile(),
extension(),
gallery_id,
base::Bind(&ConfirmWatch, base::Unretained(&loop)));
manager()->AddWatch(profile(), extension(), gallery_id,
base::BindOnce(&ConfirmWatch, base::Unretained(&loop)));
loop.Run();
}
......@@ -230,17 +228,12 @@ TEST_F(GalleryWatchManagerTest, MAYBE_Basic) {
base::RunLoop loop;
if (GalleryWatchesSupported()) {
manager()->AddWatch(profile(),
extension(),
id,
base::Bind(&ConfirmWatch, base::Unretained(&loop)));
manager()->AddWatch(profile(), extension(), id,
base::BindOnce(&ConfirmWatch, base::Unretained(&loop)));
} else {
manager()->AddWatch(
profile(),
extension(),
id,
base::Bind(&ExpectWatchError,
base::Unretained(&loop),
profile(), extension(), id,
base::BindOnce(&ExpectWatchError, base::Unretained(&loop),
GalleryWatchManager::kCouldNotWatchGalleryError));
}
loop.Run();
......
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