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

Unified Diff: content/browser/web_contents/web_contents_delegate_unittest.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/web_contents/web_contents_delegate_unittest.cc
diff --git a/content/browser/web_contents/web_contents_delegate_unittest.cc b/content/browser/web_contents/web_contents_delegate_unittest.cc
index 0de5919edd247b19d8879be5498ec15847f4d991..90358587c890ddc84315e31c52c11b6113b74391 100644
--- a/content/browser/web_contents/web_contents_delegate_unittest.cc
+++ b/content/browser/web_contents/web_contents_delegate_unittest.cc
@@ -2,11 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "content/public/browser/web_contents_delegate.h"
+
+#include <memory>
+
#include "base/compiler_specific.h"
-#include "base/memory/scoped_ptr.h"
#include "base/message_loop/message_loop.h"
#include "content/browser/web_contents/web_contents_impl.h"
-#include "content/public/browser/web_contents_delegate.h"
#include "content/public/test/test_browser_context.h"
#include "content/test/test_render_view_host.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -20,14 +22,15 @@ class WebContentsDelegateTest : public RenderViewHostImplTestHarness {
};
TEST_F(WebContentsDelegateTest, UnregisterInDestructor) {
- scoped_ptr<WebContentsImpl> contents_a(static_cast<WebContentsImpl*>(
+ std::unique_ptr<WebContentsImpl> contents_a(static_cast<WebContentsImpl*>(
WebContents::Create(WebContents::CreateParams(browser_context()))));
- scoped_ptr<WebContentsImpl> contents_b(static_cast<WebContentsImpl*>(
+ std::unique_ptr<WebContentsImpl> contents_b(static_cast<WebContentsImpl*>(
WebContents::Create(WebContents::CreateParams(browser_context()))));
EXPECT_EQ(NULL, contents_a->GetDelegate());
EXPECT_EQ(NULL, contents_b->GetDelegate());
- scoped_ptr<MockWebContentsDelegate> delegate(new MockWebContentsDelegate());
+ std::unique_ptr<MockWebContentsDelegate> delegate(
+ new MockWebContentsDelegate());
// Setting a delegate should work correctly.
contents_a->SetDelegate(delegate.get());
« no previous file with comments | « content/browser/web_contents/web_contents_android.cc ('k') | content/browser/web_contents/web_contents_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698