Commit f66ab261 authored by Shakti Sahu's avatar Shakti Sahu Committed by Commit Bot

Fixed a crash in AutoResumptionHandler

Bug: 931135
Change-Id: I0358a80dfd25ef009a93703663f6170160586e51
Reviewed-on: https://chromium-review.googlesource.com/c/1483359Reviewed-by: default avatarMin Qin <qinmin@chromium.org>
Commit-Queue: Shakti Sahu <shaktisahu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#634887}
parent 1a6c92df
......@@ -382,6 +382,7 @@ void DownloadController::OnDownloadStarted(
download_item->RemoveObserver(this);
download_item->AddObserver(this);
if (download::AutoResumptionHandler::Get())
download::AutoResumptionHandler::Get()->OnDownloadStarted(download_item);
OnDownloadUpdated(download_item);
......
......@@ -40,7 +40,8 @@ class COMPONENTS_DOWNLOAD_EXPORT AutoResumptionHandler
std::unique_ptr<download::TaskManager> task_manager,
std::unique_ptr<Config> config);
// Returns the singleton instance of the AutoResumptionHandler.
// Returns the singleton instance of the AutoResumptionHandler, or nullptr if
// initialization is not yet complete.
static AutoResumptionHandler* Get();
AutoResumptionHandler(
......
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