This method deletes the instance and resets it to nullptr to avoid memory leaks in tests.
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/e20eaff5a1370e290a8ac4923dfeefb40303b45e commit e20eaff5a1370e290a8ac4923dfeefb40303b45e Author: Catherine Chung <catherinechung@google.com> Date: Wed Jul 19 21:32:04 2017 DeleteInstanceForTesting method for the DesktopSessionDurationTracker This method deletes the instance and resets it to nullptr to avoid memory leaks in tests. Bug: 743049 Change-Id: Ib14253155c2282dd8c4cedcc9bc25f7389ae7a28 Reviewed-on: https://chromium-review.googlesource.com/571504 Reviewed-by: Robert Kaplow <rkaplow@chromium.org> Reviewed-by: Robert Liao <robliao@chromium.org> Reviewed-by: Chris Hamilton <chrisha@chromium.org> Commit-Queue: Catherine Chung <catherinechung@google.com> Cr-Commit-Position: refs/heads/master@{#487994} [modify] https://crrev.com/e20eaff5a1370e290a8ac4923dfeefb40303b45e/chrome/browser/metrics/desktop_session_duration/desktop_session_duration_tracker.cc [modify] https://crrev.com/e20eaff5a1370e290a8ac4923dfeefb40303b45e/chrome/browser/metrics/desktop_session_duration/desktop_session_duration_tracker.h [modify] https://crrev.com/e20eaff5a1370e290a8ac4923dfeefb40303b45e/chrome/browser/metrics/desktop_session_duration/desktop_session_duration_tracker_unittest.cc
https://chromium.googlesource.com/chromium/src/+/e20eaff5a1370e290a8ac4923dfeefb40303b45e
Comment 1 by sheriffbot@chromium.org
, Jul 17 2017