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

Unified Diff: content/browser/android/download_controller_android_impl.cc

Issue 1874893002: Convert //content/browser from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
Index: content/browser/android/download_controller_android_impl.cc
diff --git a/content/browser/android/download_controller_android_impl.cc b/content/browser/android/download_controller_android_impl.cc
index e0492d11280fdcbaab0f578856c04929cce54fc2..b16ec2bec3dca97b4ac870e629ae87a8a2c200d3 100644
--- a/content/browser/android/download_controller_android_impl.cc
+++ b/content/browser/android/download_controller_android_impl.cc
@@ -4,6 +4,7 @@
#include "content/browser/android/download_controller_android_impl.h"
+#include <memory>
#include <utility>
#include "base/android/context_utils.h"
@@ -12,7 +13,6 @@
#include "base/bind.h"
#include "base/lazy_instance.h"
#include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
#include "base/synchronization/lock.h"
#include "base/time/time.h"
#include "content/browser/android/content_view_core_impl.h"
@@ -80,7 +80,7 @@ void CreateContextMenuDownload(int render_process_id,
static_cast<content::DownloadManagerImpl*>(
content::BrowserContext::GetDownloadManager(
web_contents->GetBrowserContext()));
- scoped_ptr<content::DownloadUrlParameters> dl_params(
+ std::unique_ptr<content::DownloadUrlParameters> dl_params(
content::DownloadUrlParameters::FromWebContents(web_contents, url));
content::Referrer referrer = content::Referrer::SanitizeForRequest(
url,
@@ -126,10 +126,11 @@ static void OnRequestFileAccessResult(JNIEnv* env,
DCHECK(callback_id);
// Convert java long long int to c++ pointer, take ownership.
- scoped_ptr<DownloadControllerAndroid::AcquireFileAccessPermissionCallback> cb(
- reinterpret_cast<
- DownloadControllerAndroid::AcquireFileAccessPermissionCallback*>(
- callback_id));
+ std::unique_ptr<
+ DownloadControllerAndroid::AcquireFileAccessPermissionCallback>
+ cb(reinterpret_cast<
+ DownloadControllerAndroid::AcquireFileAccessPermissionCallback*>(
+ callback_id));
cb->Run(granted);
}

Powered by Google App Engine
This is Rietveld 408576698