Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(505)

Unified Diff: chrome/browser/chromeos/drive/download_handler.cc

Issue 2851013002: Switch SupportsUserData uses to use unique_ptr. (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/ui/web_contents_forced_title.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/drive/download_handler.cc
diff --git a/chrome/browser/chromeos/drive/download_handler.cc b/chrome/browser/chromeos/drive/download_handler.cc
index 42e23036db4f06082f6d5fde7d368d196169dbdc..9111e8b56d7b82ad0086cea4ab1a4b0b5443601a 100644
--- a/chrome/browser/chromeos/drive/download_handler.cc
+++ b/chrome/browser/chromeos/drive/download_handler.cc
@@ -9,6 +9,7 @@
#include "base/bind.h"
#include "base/files/file_util.h"
#include "base/macros.h"
+#include "base/memory/ptr_util.h"
#include "base/strings/string_util.h"
#include "base/supports_user_data.h"
#include "base/task_scheduler/post_task.h"
@@ -211,7 +212,8 @@ void DownloadHandler::SetDownloadParams(const base::FilePath& drive_path,
return;
if (util::IsUnderDriveMountPoint(drive_path)) {
- download->SetUserData(&kDrivePathKey, new DriveUserData(drive_path));
+ download->SetUserData(&kDrivePathKey,
+ base::MakeUnique<DriveUserData>(drive_path));
download->SetDisplayName(drive_path.BaseName());
} else if (IsDriveDownload(download)) {
// This may have been previously set if the default download folder is
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/ui/web_contents_forced_title.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698