Index: components/navigation_interception/intercept_navigation_throttle_unittest.cc |
diff --git a/components/navigation_interception/intercept_navigation_throttle_unittest.cc b/components/navigation_interception/intercept_navigation_throttle_unittest.cc |
index f3096ded0cb01fde4a28aef9a725f3b693574e11..33817bb0d3c86b6242a611cbabcd2a7f85af7658 100644 |
--- a/components/navigation_interception/intercept_navigation_throttle_unittest.cc |
+++ b/components/navigation_interception/intercept_navigation_throttle_unittest.cc |
@@ -2,10 +2,13 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
+#include "components/navigation_interception/intercept_navigation_throttle.h" |
+ |
+#include <memory> |
+ |
#include "base/bind.h" |
#include "base/bind_helpers.h" |
-#include "base/memory/scoped_ptr.h" |
-#include "components/navigation_interception/intercept_navigation_throttle.h" |
+#include "base/memory/ptr_util.h" |
#include "components/navigation_interception/navigation_params.h" |
#include "content/public/browser/navigation_handle.h" |
#include "content/public/browser/navigation_throttle.h" |
@@ -58,11 +61,11 @@ class InterceptNavigationThrottleTest |
NavigationThrottle::ThrottleCheckResult |
SimulateWillStart(const GURL& url, const GURL& sanitized_url, bool is_post) { |
- scoped_ptr<content::NavigationHandle> test_handle = |
- content::NavigationHandle::CreateNavigationHandleForTesting( |
- url, main_rfh()); |
+ std::unique_ptr<content::NavigationHandle> test_handle = |
+ content::NavigationHandle::CreateNavigationHandleForTesting(url, |
+ main_rfh()); |
test_handle->RegisterThrottleForTesting( |
- scoped_ptr<NavigationThrottle>(new InterceptNavigationThrottle( |
+ base::WrapUnique(new InterceptNavigationThrottle( |
test_handle.get(), |
base::Bind(&MockInterceptCallbackReceiver::ShouldIgnoreNavigation, |
base::Unretained(mock_callback_receiver_.get())), |
@@ -72,11 +75,11 @@ class InterceptNavigationThrottleTest |
} |
NavigationThrottle::ThrottleCheckResult Simulate302() { |
- scoped_ptr<content::NavigationHandle> test_handle = |
+ std::unique_ptr<content::NavigationHandle> test_handle = |
content::NavigationHandle::CreateNavigationHandleForTesting( |
- GURL(kTestUrl), main_rfh()); |
+ GURL(kTestUrl), main_rfh()); |
test_handle->RegisterThrottleForTesting( |
- scoped_ptr<NavigationThrottle>(new InterceptNavigationThrottle( |
+ base::WrapUnique(new InterceptNavigationThrottle( |
test_handle.get(), |
base::Bind(&MockInterceptCallbackReceiver::ShouldIgnoreNavigation, |
base::Unretained(mock_callback_receiver_.get())), |
@@ -87,7 +90,7 @@ class InterceptNavigationThrottleTest |
GURL(), false); |
} |
- scoped_ptr<MockInterceptCallbackReceiver> mock_callback_receiver_; |
+ std::unique_ptr<MockInterceptCallbackReceiver> mock_callback_receiver_; |
}; |
TEST_F(InterceptNavigationThrottleTest, |