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

Unified Diff: content/browser/presentation/presentation_service_impl_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/presentation/presentation_service_impl_unittest.cc
diff --git a/content/browser/presentation/presentation_service_impl_unittest.cc b/content/browser/presentation/presentation_service_impl_unittest.cc
index e25190bd80310fd7958e0c16704393572a785f76..172e8b5b80add55ea59dc6ec806d0aa80d1f7582 100644
--- a/content/browser/presentation/presentation_service_impl_unittest.cc
+++ b/content/browser/presentation/presentation_service_impl_unittest.cc
@@ -6,12 +6,13 @@
#include <stddef.h>
#include <stdint.h>
+
+#include <memory>
#include <string>
#include <utility>
#include <vector>
#include "base/location.h"
-#include "base/memory/scoped_ptr.h"
#include "base/run_loop.h"
#include "base/single_thread_task_runner.h"
#include "base/test/test_timeouts.h"
@@ -126,7 +127,7 @@ class MockPresentationServiceDelegate : public PresentationServiceDelegate {
void SendMessage(int render_process_id,
int render_frame_id,
const content::PresentationSessionInfo& session,
- scoped_ptr<PresentationSessionMessage> message_request,
+ std::unique_ptr<PresentationSessionMessage> message_request,
const SendMessageCallback& send_message_cb) override {
SendMessageRawPtr(render_process_id, render_frame_id, session,
message_request.release(), send_message_cb);
@@ -334,7 +335,7 @@ class PresentationServiceImplTest : public RenderViewHostImplTestHarness {
}
ScopedVector<PresentationSessionMessage> messages;
- scoped_ptr<content::PresentationSessionMessage> message;
+ std::unique_ptr<content::PresentationSessionMessage> message;
message.reset(
new content::PresentationSessionMessage(PresentationMessageType::TEXT));
message->message = text_msg;
@@ -357,11 +358,12 @@ class PresentationServiceImplTest : public RenderViewHostImplTestHarness {
MockPresentationServiceDelegate mock_delegate_;
- scoped_ptr<PresentationServiceImpl> service_impl_;
+ std::unique_ptr<PresentationServiceImpl> service_impl_;
mojo::InterfacePtr<mojom::PresentationService> service_ptr_;
MockPresentationServiceClient mock_client_;
- scoped_ptr<mojo::Binding<mojom::PresentationServiceClient>> client_binding_;
+ std::unique_ptr<mojo::Binding<mojom::PresentationServiceClient>>
+ client_binding_;
base::Closure run_loop_quit_closure_;
int default_session_started_count_;
@@ -686,7 +688,7 @@ TEST_F(PresentationServiceImplTest, SendStringMessage) {
run_loop.Run();
// Make sure |test_message| gets deleted.
- scoped_ptr<PresentationSessionMessage> scoped_test_message(test_message);
+ std::unique_ptr<PresentationSessionMessage> scoped_test_message(test_message);
EXPECT_TRUE(test_message);
EXPECT_FALSE(test_message->is_binary());
EXPECT_LE(test_message->message.size(), kMaxPresentationSessionMessageSize);
@@ -723,7 +725,7 @@ TEST_F(PresentationServiceImplTest, SendArrayBuffer) {
run_loop.Run();
// Make sure |test_message| gets deleted.
- scoped_ptr<PresentationSessionMessage> scoped_test_message(test_message);
+ std::unique_ptr<PresentationSessionMessage> scoped_test_message(test_message);
EXPECT_TRUE(test_message);
EXPECT_TRUE(test_message->is_binary());
EXPECT_EQ(PresentationMessageType::ARRAY_BUFFER, test_message->type);
@@ -796,7 +798,7 @@ TEST_F(PresentationServiceImplTest, SendBlobData) {
run_loop.Run();
// Make sure |test_message| gets deleted.
- scoped_ptr<PresentationSessionMessage> scoped_test_message(test_message);
+ std::unique_ptr<PresentationSessionMessage> scoped_test_message(test_message);
EXPECT_TRUE(test_message);
EXPECT_TRUE(test_message->is_binary());
EXPECT_EQ(PresentationMessageType::BLOB, test_message->type);

Powered by Google App Engine
This is Rietveld 408576698