| Index: chrome/browser/download/chrome_download_manager_delegate.cc
|
| diff --git a/chrome/browser/download/chrome_download_manager_delegate.cc b/chrome/browser/download/chrome_download_manager_delegate.cc
|
| index f9b4e533b35e9ccf03fc79d18ea55d9b30a00978..c070dfe36c74236bee7bd5af92fb14c29501e7c6 100644
|
| --- a/chrome/browser/download/chrome_download_manager_delegate.cc
|
| +++ b/chrome/browser/download/chrome_download_manager_delegate.cc
|
| @@ -11,6 +11,7 @@
|
| #include "base/callback.h"
|
| #include "base/files/file_util.h"
|
| #include "base/macros.h"
|
| +#include "base/memory/ptr_util.h"
|
| #include "base/metrics/histogram_macros.h"
|
| #include "base/rand_util.h"
|
| #include "base/strings/utf_string_conversions.h"
|
| @@ -318,7 +319,7 @@ void ChromeDownloadManagerDelegate::DisableSafeBrowsing(DownloadItem* item) {
|
| item->GetUserData(&kSafeBrowsingUserDataKey));
|
| if (!state) {
|
| state = new SafeBrowsingState();
|
| - item->SetUserData(&kSafeBrowsingUserDataKey, state);
|
| + item->SetUserData(&kSafeBrowsingUserDataKey, base::WrapUnique(state));
|
| }
|
| state->CompleteDownload();
|
| #endif
|
| @@ -339,7 +340,7 @@ bool ChromeDownloadManagerDelegate::IsDownloadReadyForCompletion(
|
| << item->DebugString(false);
|
| state = new SafeBrowsingState();
|
| state->set_callback(internal_complete_callback);
|
| - item->SetUserData(&kSafeBrowsingUserDataKey, state);
|
| + item->SetUserData(&kSafeBrowsingUserDataKey, base::WrapUnique(state));
|
| service->CheckClientDownload(
|
| item,
|
| base::Bind(&ChromeDownloadManagerDelegate::CheckClientDownloadDone,
|
|
|