commit | cd8da806304ba29220fb470417110d908e90888a | [log] [tgz] |
---|---|---|
author | Jeremy Roman <[email protected]> | Tue Aug 20 14:24:00 2019 |
committer | Commit Bot <[email protected]> | Tue Aug 20 14:24:00 2019 |
tree | 97d3a68c2d9c880e5f5ca2a9f17293cdc635df8d | |
parent | 1baff8534e23bfe7672d0ddfd6cabf3d3807595e [diff] |
Use in-class initializers for base::WeakPtrFactory (remaining uses on Chrome OS). Changed NULL to nullptr where the presubmit complained (due to new line wrapping). Generated by: https://chromium-review.googlesource.com/c/chromium/src/+/1689216 Bug: 981415 Tbr: [email protected] Change-Id: I9c7ea90816e2a2418981108f657bc52cee8c06ef Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1703541 Commit-Queue: Jeremy Roman <[email protected]> Reviewed-by: Jeremy Roman <[email protected]> Reviewed-by: James Cook <[email protected]> Reviewed-by: Gabriel Charette <[email protected]> Cr-Original-Commit-Position: refs/heads/master@{#688514} Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src Cr-Mirrored-Commit: 47d432e71ef8ddf621b69f0fc6e6362bf1be6278
diff --git a/alarm_timer_chromeos.cc b/alarm_timer_chromeos.cc index 787e4f5..af98c06 100644 --- a/alarm_timer_chromeos.cc +++ b/alarm_timer_chromeos.cc
@@ -48,7 +48,7 @@ } SimpleAlarmTimer::SimpleAlarmTimer(base::ScopedFD alarm_fd) - : alarm_fd_(std::move(alarm_fd)), weak_factory_(this) {} + : alarm_fd_(std::move(alarm_fd)) {} SimpleAlarmTimer::~SimpleAlarmTimer() { DCHECK(origin_task_runner_->RunsTasksInCurrentSequence());
diff --git a/alarm_timer_chromeos.h b/alarm_timer_chromeos.h index e1301e9..c1e0012 100644 --- a/alarm_timer_chromeos.h +++ b/alarm_timer_chromeos.h
@@ -79,7 +79,7 @@ std::unique_ptr<base::PendingTask> pending_task_; // Used to invalidate pending callbacks. - base::WeakPtrFactory<SimpleAlarmTimer> weak_factory_; + base::WeakPtrFactory<SimpleAlarmTimer> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(SimpleAlarmTimer); };