Commit ed18a48c authored by kylechar's avatar kylechar Committed by Commit Bot

gpu: Cleanup callback types (part 4).

Remove usage of deprecated base::Bind, base::Callback, base::Closure,
base::CancelableCallback and base::CancelableClosure types from
content/gpu/*, content/browser/gpu* and chrome/gpu/*. Where possible
convert to the corresponding once type. Otherwise replace with the
repeating type which is equivalent to the deprecated type.

Bug: 714018
Change-Id: I8da148c51d9eb8b5d85a4a8f76b41f8a13ff295f
Reviewed-on: https://chromium-review.googlesource.com/c/1456941Reviewed-by: default avatarAntoine Labour <piman@chromium.org>
Commit-Queue: kylechar <kylechar@chromium.org>
Cr-Commit-Position: refs/heads/master@{#629955}
parent 2a95c5f6
...@@ -51,21 +51,23 @@ void ChromeContentGpuClient::InitializeRegistry( ...@@ -51,21 +51,23 @@ void ChromeContentGpuClient::InitializeRegistry(
service_manager::BinderRegistry* registry) { service_manager::BinderRegistry* registry) {
#if defined(OS_CHROMEOS) #if defined(OS_CHROMEOS)
registry->AddInterface( registry->AddInterface(
base::Bind(&ChromeContentGpuClient::CreateArcVideoDecodeAccelerator, base::BindRepeating(
base::Unretained(this)), &ChromeContentGpuClient::CreateArcVideoDecodeAccelerator,
base::Unretained(this)),
base::ThreadTaskRunnerHandle::Get()); base::ThreadTaskRunnerHandle::Get());
registry->AddInterface( registry->AddInterface(
base::Bind(&ChromeContentGpuClient::CreateArcVideoEncodeAccelerator, base::BindRepeating(
base::Unretained(this)), &ChromeContentGpuClient::CreateArcVideoEncodeAccelerator,
base::Unretained(this)),
base::ThreadTaskRunnerHandle::Get()); base::ThreadTaskRunnerHandle::Get());
registry->AddInterface( registry->AddInterface(
base::Bind( base::BindRepeating(
&ChromeContentGpuClient::CreateArcVideoProtectedBufferAllocator, &ChromeContentGpuClient::CreateArcVideoProtectedBufferAllocator,
base::Unretained(this)), base::Unretained(this)),
base::ThreadTaskRunnerHandle::Get()); base::ThreadTaskRunnerHandle::Get());
registry->AddInterface( registry->AddInterface(
base::Bind(&ChromeContentGpuClient::CreateProtectedBufferManager, base::BindRepeating(&ChromeContentGpuClient::CreateProtectedBufferManager,
base::Unretained(this)), base::Unretained(this)),
base::ThreadTaskRunnerHandle::Get()); base::ThreadTaskRunnerHandle::Get());
#endif #endif
} }
...@@ -76,9 +78,9 @@ void ChromeContentGpuClient::GpuServiceInitialized( ...@@ -76,9 +78,9 @@ void ChromeContentGpuClient::GpuServiceInitialized(
gpu_preferences_ = gpu_preferences; gpu_preferences_ = gpu_preferences;
ui::OzonePlatform::GetInstance() ui::OzonePlatform::GetInstance()
->GetSurfaceFactoryOzone() ->GetSurfaceFactoryOzone()
->SetGetProtectedNativePixmapDelegate( ->SetGetProtectedNativePixmapDelegate(base::BindRepeating(
base::Bind(&arc::ProtectedBufferManager::GetProtectedNativePixmapFor, &arc::ProtectedBufferManager::GetProtectedNativePixmapFor,
base::Unretained(protected_buffer_manager_.get()))); base::Unretained(protected_buffer_manager_.get())));
#endif #endif
// This doesn't work in single-process mode. // This doesn't work in single-process mode.
......
...@@ -411,7 +411,7 @@ void BrowserGpuChannelHostFactory::RestartTimeout() { ...@@ -411,7 +411,7 @@ void BrowserGpuChannelHostFactory::RestartTimeout() {
#endif #endif
timeout_.Start(FROM_HERE, timeout_.Start(FROM_HERE,
base::TimeDelta::FromSeconds(kGpuChannelTimeoutInSeconds), base::TimeDelta::FromSeconds(kGpuChannelTimeoutInSeconds),
base::Bind(&TimedOut)); base::BindOnce(&TimedOut));
#endif // OS_ANDROID #endif // OS_ANDROID
} }
......
...@@ -57,10 +57,9 @@ gpu::GpuFeatureStatus GpuDataManagerImpl::GetFeatureStatus( ...@@ -57,10 +57,9 @@ gpu::GpuFeatureStatus GpuDataManagerImpl::GetFeatureStatus(
} }
void GpuDataManagerImpl::RequestVideoMemoryUsageStatsUpdate( void GpuDataManagerImpl::RequestVideoMemoryUsageStatsUpdate(
const base::Callback<void(const gpu::VideoMemoryUsageStats& stats)>& VideoMemoryUsageStatsCallback callback) const {
callback) const {
base::AutoLock auto_lock(lock_); base::AutoLock auto_lock(lock_);
private_->RequestVideoMemoryUsageStatsUpdate(callback); private_->RequestVideoMemoryUsageStatsUpdate(std::move(callback));
} }
void GpuDataManagerImpl::AddObserver( void GpuDataManagerImpl::AddObserver(
......
...@@ -33,7 +33,6 @@ class GURL; ...@@ -33,7 +33,6 @@ class GURL;
namespace gpu { namespace gpu {
struct GpuPreferences; struct GpuPreferences;
struct VideoMemoryUsageStats;
} }
namespace content { namespace content {
...@@ -52,8 +51,7 @@ class CONTENT_EXPORT GpuDataManagerImpl : public GpuDataManager { ...@@ -52,8 +51,7 @@ class CONTENT_EXPORT GpuDataManagerImpl : public GpuDataManager {
void RequestCompleteGpuInfoIfNeeded() override; void RequestCompleteGpuInfoIfNeeded() override;
bool IsEssentialGpuInfoAvailable() const override; bool IsEssentialGpuInfoAvailable() const override;
void RequestVideoMemoryUsageStatsUpdate( void RequestVideoMemoryUsageStatsUpdate(
const base::Callback<void(const gpu::VideoMemoryUsageStats& stats)>& VideoMemoryUsageStatsCallback callback) const override;
callback) const override;
// TODO(kbr): the threading model for the GpuDataManagerObservers is // TODO(kbr): the threading model for the GpuDataManagerObservers is
// not well defined, and it's impossible for callers to correctly // not well defined, and it's impossible for callers to correctly
// delete observers from anywhere except in one of the observer's // delete observers from anywhere except in one of the observer's
......
...@@ -234,21 +234,19 @@ enum BlockStatusHistogram { ...@@ -234,21 +234,19 @@ enum BlockStatusHistogram {
}; };
void OnVideoMemoryUsageStats( void OnVideoMemoryUsageStats(
const base::Callback<void(const gpu::VideoMemoryUsageStats& stats)>& GpuDataManager::VideoMemoryUsageStatsCallback callback,
callback,
const gpu::VideoMemoryUsageStats& stats) { const gpu::VideoMemoryUsageStats& stats) {
base::PostTaskWithTraits(FROM_HERE, {BrowserThread::UI}, base::PostTaskWithTraits(FROM_HERE, {BrowserThread::UI},
base::BindOnce(callback, stats)); base::BindOnce(std::move(callback), stats));
} }
void RequestVideoMemoryUsageStats( void RequestVideoMemoryUsageStats(
const base::Callback<void(const gpu::VideoMemoryUsageStats& stats)>& GpuDataManager::VideoMemoryUsageStatsCallback callback,
callback,
GpuProcessHost* host) { GpuProcessHost* host) {
if (!host) if (!host)
return; return;
host->gpu_service()->GetVideoMemoryUsageStats( host->gpu_service()->GetVideoMemoryUsageStats(
base::BindOnce(&OnVideoMemoryUsageStats, callback)); base::BindOnce(&OnVideoMemoryUsageStats, std::move(callback)));
} }
#if defined(OS_WIN) #if defined(OS_WIN)
...@@ -390,7 +388,7 @@ void GpuDataManagerImplPrivate::RequestCompleteGpuInfoIfNeeded() { ...@@ -390,7 +388,7 @@ void GpuDataManagerImplPrivate::RequestCompleteGpuInfoIfNeeded() {
complete_gpu_info_already_requested_ = true; complete_gpu_info_already_requested_ = true;
GpuProcessHost::CallOnIO(GpuProcessHost::GPU_PROCESS_KIND_UNSANDBOXED_NO_GL, GpuProcessHost::CallOnIO(GpuProcessHost::GPU_PROCESS_KIND_UNSANDBOXED_NO_GL,
true /* force_create */, true /* force_create */,
base::Bind([](GpuProcessHost* host) { base::BindOnce([](GpuProcessHost* host) {
if (!host) if (!host)
return; return;
host->gpu_service()->RequestCompleteGpuInfo( host->gpu_service()->RequestCompleteGpuInfo(
...@@ -440,11 +438,10 @@ gpu::GpuFeatureStatus GpuDataManagerImplPrivate::GetFeatureStatus( ...@@ -440,11 +438,10 @@ gpu::GpuFeatureStatus GpuDataManagerImplPrivate::GetFeatureStatus(
} }
void GpuDataManagerImplPrivate::RequestVideoMemoryUsageStatsUpdate( void GpuDataManagerImplPrivate::RequestVideoMemoryUsageStatsUpdate(
const base::Callback<void(const gpu::VideoMemoryUsageStats& stats)>& GpuDataManager::VideoMemoryUsageStatsCallback callback) const {
callback) const { GpuProcessHost::CallOnIO(
GpuProcessHost::CallOnIO(GpuProcessHost::GPU_PROCESS_KIND_SANDBOXED, GpuProcessHost::GPU_PROCESS_KIND_SANDBOXED, false /* force_create */,
false /* force_create */, base::BindOnce(&RequestVideoMemoryUsageStats, std::move(callback)));
base::Bind(&RequestVideoMemoryUsageStats, callback));
} }
void GpuDataManagerImplPrivate::AddObserver(GpuDataManagerObserver* observer) { void GpuDataManagerImplPrivate::AddObserver(GpuDataManagerObserver* observer) {
...@@ -691,7 +688,7 @@ void GpuDataManagerImplPrivate::HandleGpuSwitch() { ...@@ -691,7 +688,7 @@ void GpuDataManagerImplPrivate::HandleGpuSwitch() {
// Pass the notification to the GPU process to notify observers there. // Pass the notification to the GPU process to notify observers there.
GpuProcessHost::CallOnIO(GpuProcessHost::GPU_PROCESS_KIND_SANDBOXED, GpuProcessHost::CallOnIO(GpuProcessHost::GPU_PROCESS_KIND_SANDBOXED,
false /* force_create */, false /* force_create */,
base::Bind([](GpuProcessHost* host) { base::BindOnce([](GpuProcessHost* host) {
if (host) if (host)
host->gpu_service()->GpuSwitched(); host->gpu_service()->GpuSwitched();
})); }));
......
...@@ -30,7 +30,6 @@ class CommandLine; ...@@ -30,7 +30,6 @@ class CommandLine;
namespace gpu { namespace gpu {
struct GpuPreferences; struct GpuPreferences;
struct VideoMemoryUsageStats;
} }
namespace content { namespace content {
...@@ -51,8 +50,7 @@ class CONTENT_EXPORT GpuDataManagerImplPrivate { ...@@ -51,8 +50,7 @@ class CONTENT_EXPORT GpuDataManagerImplPrivate {
bool IsGpuFeatureInfoAvailable() const; bool IsGpuFeatureInfoAvailable() const;
gpu::GpuFeatureStatus GetFeatureStatus(gpu::GpuFeatureType feature) const; gpu::GpuFeatureStatus GetFeatureStatus(gpu::GpuFeatureType feature) const;
void RequestVideoMemoryUsageStatsUpdate( void RequestVideoMemoryUsageStatsUpdate(
const base::Callback<void(const gpu::VideoMemoryUsageStats& stats)>& GpuDataManager::VideoMemoryUsageStatsCallback callback) const;
callback) const;
void AddObserver(GpuDataManagerObserver* observer); void AddObserver(GpuDataManagerObserver* observer);
void RemoveObserver(GpuDataManagerObserver* observer); void RemoveObserver(GpuDataManagerObserver* observer);
void UnblockDomainFrom3DAPIs(const GURL& url); void UnblockDomainFrom3DAPIs(const GURL& url);
......
...@@ -111,11 +111,6 @@ class BrowserGpuChannelHostFactoryTest : public ContentBrowserTest { ...@@ -111,11 +111,6 @@ class BrowserGpuChannelHostFactoryTest : public ContentBrowserTest {
command_line->AppendSwitch(switches::kDisableGpuEarlyInit); command_line->AppendSwitch(switches::kDisableGpuEarlyInit);
} }
void OnContextLost(const base::Closure callback, int* counter) {
(*counter)++;
callback.Run();
}
void Signal(bool* event, void Signal(bool* event,
scoped_refptr<gpu::GpuChannelHost> gpu_channel_host) { scoped_refptr<gpu::GpuChannelHost> gpu_channel_host) {
CHECK_EQ(*event, false); CHECK_EQ(*event, false);
...@@ -287,7 +282,7 @@ IN_PROC_BROWSER_TEST_F(BrowserGpuChannelHostFactoryTest, ...@@ -287,7 +282,7 @@ IN_PROC_BROWSER_TEST_F(BrowserGpuChannelHostFactoryTest,
ASSERT_EQ(provider->BindToCurrentThread(), gpu::ContextResult::kSuccess); ASSERT_EQ(provider->BindToCurrentThread(), gpu::ContextResult::kSuccess);
GpuProcessHost::CallOnIO(GpuProcessHost::GPU_PROCESS_KIND_SANDBOXED, GpuProcessHost::CallOnIO(GpuProcessHost::GPU_PROCESS_KIND_SANDBOXED,
false /* force_create */, false /* force_create */,
base::Bind([](GpuProcessHost* host) { base::BindOnce([](GpuProcessHost* host) {
if (host) if (host)
host->gpu_service()->Crash(); host->gpu_service()->Crash();
})); }));
......
...@@ -275,9 +275,9 @@ GpuProcessHost* g_gpu_process_hosts[GpuProcessHost::GPU_PROCESS_KIND_COUNT]; ...@@ -275,9 +275,9 @@ GpuProcessHost* g_gpu_process_hosts[GpuProcessHost::GPU_PROCESS_KIND_COUNT];
void RunCallbackOnIO(GpuProcessHost::GpuProcessKind kind, void RunCallbackOnIO(GpuProcessHost::GpuProcessKind kind,
bool force_create, bool force_create,
const base::Callback<void(GpuProcessHost*)>& callback) { base::OnceCallback<void(GpuProcessHost*)> callback) {
GpuProcessHost* host = GpuProcessHost::Get(kind, force_create); GpuProcessHost* host = GpuProcessHost::Get(kind, force_create);
callback.Run(host); std::move(callback).Run(host);
} }
void OnGpuProcessHostDestroyedOnUI(int host_id, const std::string& message) { void OnGpuProcessHostDestroyedOnUI(int host_id, const std::string& message) {
...@@ -484,11 +484,12 @@ class GpuProcessHost::ConnectionFilterImpl : public ConnectionFilter { ...@@ -484,11 +484,12 @@ class GpuProcessHost::ConnectionFilterImpl : public ConnectionFilter {
explicit ConnectionFilterImpl(int gpu_process_id) { explicit ConnectionFilterImpl(int gpu_process_id) {
auto task_runner = auto task_runner =
base::CreateSingleThreadTaskRunnerWithTraits({BrowserThread::UI}); base::CreateSingleThreadTaskRunnerWithTraits({BrowserThread::UI});
registry_.AddInterface(base::Bind(&FieldTrialRecorder::Create), registry_.AddInterface(base::BindRepeating(&FieldTrialRecorder::Create),
task_runner); task_runner);
#if defined(OS_ANDROID) #if defined(OS_ANDROID)
registry_.AddInterface( registry_.AddInterface(
base::Bind(&BindJavaInterface<media::mojom::AndroidOverlayProvider>), base::BindRepeating(
&BindJavaInterface<media::mojom::AndroidOverlayProvider>),
task_runner); task_runner);
#endif #endif
} }
...@@ -599,13 +600,13 @@ void GpuProcessHost::GetHasGpuProcess(base::OnceCallback<void(bool)> callback) { ...@@ -599,13 +600,13 @@ void GpuProcessHost::GetHasGpuProcess(base::OnceCallback<void(bool)> callback) {
void GpuProcessHost::CallOnIO( void GpuProcessHost::CallOnIO(
GpuProcessKind kind, GpuProcessKind kind,
bool force_create, bool force_create,
const base::Callback<void(GpuProcessHost*)>& callback) { base::OnceCallback<void(GpuProcessHost*)> callback) {
#if !defined(OS_WIN) #if !defined(OS_WIN)
DCHECK_NE(kind, GpuProcessHost::GPU_PROCESS_KIND_UNSANDBOXED_NO_GL); DCHECK_NE(kind, GpuProcessHost::GPU_PROCESS_KIND_UNSANDBOXED_NO_GL);
#endif #endif
base::PostTaskWithTraits( base::PostTaskWithTraits(FROM_HERE, {BrowserThread::IO},
FROM_HERE, {BrowserThread::IO}, base::BindOnce(&RunCallbackOnIO, kind, force_create,
base::BindOnce(&RunCallbackOnIO, kind, force_create, callback)); std::move(callback)));
} }
void GpuProcessHost::BindInterface( void GpuProcessHost::BindInterface(
......
...@@ -85,7 +85,7 @@ class GpuProcessHost : public BrowserChildProcessHostDelegate, ...@@ -85,7 +85,7 @@ class GpuProcessHost : public BrowserChildProcessHostDelegate,
CONTENT_EXPORT static void CallOnIO( CONTENT_EXPORT static void CallOnIO(
GpuProcessKind kind, GpuProcessKind kind,
bool force_create, bool force_create,
const base::Callback<void(GpuProcessHost*)>& callback); base::OnceCallback<void(GpuProcessHost*)> callback);
// Get the GPU process host for the GPU process with the given ID. Returns // Get the GPU process host for the GPU process with the given ID. Returns
// null if the process no longer exists. // null if the process no longer exists.
......
...@@ -82,11 +82,11 @@ class QueueingConnectionFilter : public ConnectionFilter { ...@@ -82,11 +82,11 @@ class QueueingConnectionFilter : public ConnectionFilter {
DCHECK(io_thread_checker_.CalledOnValidThread()); DCHECK(io_thread_checker_.CalledOnValidThread());
} }
base::Closure GetReleaseCallback() { base::OnceClosure GetReleaseCallback() {
return base::Bind(base::IgnoreResult(&base::TaskRunner::PostTask), return base::BindOnce(base::IgnoreResult(&base::TaskRunner::PostTask),
io_task_runner_, FROM_HERE, io_task_runner_, FROM_HERE,
base::Bind(&QueueingConnectionFilter::Release, base::BindOnce(&QueueingConnectionFilter::Release,
weak_factory_.GetWeakPtr())); weak_factory_.GetWeakPtr()));
} }
#if defined(USE_OZONE) #if defined(USE_OZONE)
...@@ -233,13 +233,14 @@ void GpuChildThread::Init(const base::Time& process_start_time) { ...@@ -233,13 +233,14 @@ void GpuChildThread::Init(const base::Time& process_start_time) {
blink::AssociatedInterfaceRegistry* associated_registry = blink::AssociatedInterfaceRegistry* associated_registry =
&associated_interfaces_; &associated_interfaces_;
associated_registry->AddInterface(base::Bind( associated_registry->AddInterface(base::BindRepeating(
&GpuChildThread::CreateVizMainService, base::Unretained(this))); &GpuChildThread::CreateVizMainService, base::Unretained(this)));
auto registry = std::make_unique<service_manager::BinderRegistry>(); auto registry = std::make_unique<service_manager::BinderRegistry>();
registry->AddInterface(base::Bind(&GpuChildThread::BindServiceFactoryRequest, registry->AddInterface(
weak_factory_.GetWeakPtr()), base::BindRepeating(&GpuChildThread::BindServiceFactoryRequest,
base::ThreadTaskRunnerHandle::Get()); weak_factory_.GetWeakPtr()),
base::ThreadTaskRunnerHandle::Get());
if (GetContentClient()->gpu()) // nullptr in tests. if (GetContentClient()->gpu()) // nullptr in tests.
GetContentClient()->gpu()->InitializeRegistry(registry.get()); GetContentClient()->gpu()->InitializeRegistry(registry.get());
...@@ -292,8 +293,9 @@ void GpuChildThread::OnInitializationFailed() { ...@@ -292,8 +293,9 @@ void GpuChildThread::OnInitializationFailed() {
void GpuChildThread::OnGpuServiceConnection(viz::GpuServiceImpl* gpu_service) { void GpuChildThread::OnGpuServiceConnection(viz::GpuServiceImpl* gpu_service) {
media::AndroidOverlayMojoFactoryCB overlay_factory_cb; media::AndroidOverlayMojoFactoryCB overlay_factory_cb;
#if defined(OS_ANDROID) #if defined(OS_ANDROID)
overlay_factory_cb = base::Bind(&GpuChildThread::CreateAndroidOverlay, overlay_factory_cb =
base::ThreadTaskRunnerHandle::Get()); base::BindRepeating(&GpuChildThread::CreateAndroidOverlay,
base::ThreadTaskRunnerHandle::Get());
gpu_service->media_gpu_channel_manager()->SetOverlayFactory( gpu_service->media_gpu_channel_manager()->SetOverlayFactory(
overlay_factory_cb); overlay_factory_cb);
#endif #endif
...@@ -311,7 +313,8 @@ void GpuChildThread::OnGpuServiceConnection(viz::GpuServiceImpl* gpu_service) { ...@@ -311,7 +313,8 @@ void GpuChildThread::OnGpuServiceConnection(viz::GpuServiceImpl* gpu_service) {
gpu_service->gpu_preferences()); gpu_service->gpu_preferences());
} }
release_pending_requests_closure_.Run(); DCHECK(release_pending_requests_closure_);
std::move(release_pending_requests_closure_).Run();
} }
void GpuChildThread::PostCompositorThreadCreated( void GpuChildThread::PostCompositorThreadCreated(
......
...@@ -114,7 +114,7 @@ class GpuChildThread : public ChildThreadImpl, ...@@ -114,7 +114,7 @@ class GpuChildThread : public ChildThreadImpl,
blink::AssociatedInterfaceRegistry associated_interfaces_; blink::AssociatedInterfaceRegistry associated_interfaces_;
// Holds a closure that releases pending interface requests on the IO thread. // Holds a closure that releases pending interface requests on the IO thread.
base::Closure release_pending_requests_closure_; base::OnceClosure release_pending_requests_closure_;
// A closure which quits the main message loop. // A closure which quits the main message loop.
base::RepeatingClosure quit_closure_; base::RepeatingClosure quit_closure_;
......
...@@ -28,6 +28,9 @@ class GpuDataManagerObserver; ...@@ -28,6 +28,9 @@ class GpuDataManagerObserver;
// This class is fully thread-safe. // This class is fully thread-safe.
class GpuDataManager { class GpuDataManager {
public: public:
using VideoMemoryUsageStatsCallback =
base::OnceCallback<void(const gpu::VideoMemoryUsageStats&)>;
// Getter for the singleton. // Getter for the singleton.
CONTENT_EXPORT static GpuDataManager* GetInstance(); CONTENT_EXPORT static GpuDataManager* GetInstance();
...@@ -53,8 +56,7 @@ class GpuDataManager { ...@@ -53,8 +56,7 @@ class GpuDataManager {
// Requests that the GPU process report its current video memory usage stats. // Requests that the GPU process report its current video memory usage stats.
virtual void RequestVideoMemoryUsageStatsUpdate( virtual void RequestVideoMemoryUsageStatsUpdate(
const base::Callback<void(const gpu::VideoMemoryUsageStats& stats)>& VideoMemoryUsageStatsCallback callback) const = 0;
callback) const = 0;
// Registers/unregister |observer|. // Registers/unregister |observer|.
virtual void AddObserver(GpuDataManagerObserver* observer) = 0; virtual void AddObserver(GpuDataManagerObserver* observer) = 0;
......
...@@ -18,8 +18,9 @@ ShellContentGpuClient::~ShellContentGpuClient() = default; ...@@ -18,8 +18,9 @@ ShellContentGpuClient::~ShellContentGpuClient() = default;
void ShellContentGpuClient::InitializeRegistry( void ShellContentGpuClient::InitializeRegistry(
service_manager::BinderRegistry* registry) { service_manager::BinderRegistry* registry) {
registry->AddInterface<mojom::PowerMonitorTest>( registry->AddInterface<mojom::PowerMonitorTest>(
base::Bind(&PowerMonitorTestImpl::MakeStrongBinding, base::BindRepeating(
base::Passed(std::make_unique<PowerMonitorTestImpl>())), &PowerMonitorTestImpl::MakeStrongBinding,
base::Passed(std::make_unique<PowerMonitorTestImpl>())),
base::ThreadTaskRunnerHandle::Get()); base::ThreadTaskRunnerHandle::Get());
} }
......
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