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

Unified Diff: components/navigation_interception/intercept_navigation_delegate.cc

Issue 1918083002: Convert //components/[f-n]* 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: components/navigation_interception/intercept_navigation_delegate.cc
diff --git a/components/navigation_interception/intercept_navigation_delegate.cc b/components/navigation_interception/intercept_navigation_delegate.cc
index c24ccecbf413a0e201cf9d2d89614548c1370d11..13f6b0b315eae8eaa6ac45a67fac1fdf5e38c7d6 100644
--- a/components/navigation_interception/intercept_navigation_delegate.cc
+++ b/components/navigation_interception/intercept_navigation_delegate.cc
@@ -7,6 +7,7 @@
#include "base/android/jni_android.h"
#include "base/android/jni_string.h"
#include "base/callback.h"
+#include "base/memory/ptr_util.h"
#include "components/navigation_interception/intercept_navigation_throttle.h"
#include "components/navigation_interception/navigation_params_android.h"
#include "content/public/browser/browser_thread.h"
@@ -71,7 +72,7 @@ void UpdateUserGestureCarryoverInfoOnUIThread(int render_process_id,
// static
void InterceptNavigationDelegate::Associate(
WebContents* web_contents,
- scoped_ptr<InterceptNavigationDelegate> delegate) {
+ std::unique_ptr<InterceptNavigationDelegate> delegate) {
web_contents->SetUserData(kInterceptNavigationDelegateUserDataKey,
delegate.release());
}
@@ -84,12 +85,11 @@ InterceptNavigationDelegate* InterceptNavigationDelegate::Get(
}
// static
-scoped_ptr<content::NavigationThrottle>
+std::unique_ptr<content::NavigationThrottle>
InterceptNavigationDelegate::CreateThrottleFor(
content::NavigationHandle* handle) {
- return scoped_ptr<content::NavigationThrottle>(
- new InterceptNavigationThrottle(
- handle, base::Bind(&CheckIfShouldIgnoreNavigationOnUIThread), false));
+ return base::WrapUnique(new InterceptNavigationThrottle(
+ handle, base::Bind(&CheckIfShouldIgnoreNavigationOnUIThread), false));
}
// static

Powered by Google App Engine
This is Rietveld 408576698