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

Unified Diff: components/navigation_interception/intercept_navigation_throttle_unittest.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_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,
« no previous file with comments | « components/navigation_interception/intercept_navigation_delegate.cc ('k') | components/net_log/chrome_net_log.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698