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

Unified Diff: remoting/client/server_log_entry_client_unittest.cc

Issue 1864213002: Convert //remoting to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Mac IWYU 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
« no previous file with comments | « remoting/client/server_log_entry_client.cc ('k') | remoting/client/software_video_renderer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/client/server_log_entry_client_unittest.cc
diff --git a/remoting/client/server_log_entry_client_unittest.cc b/remoting/client/server_log_entry_client_unittest.cc
index 494f655bbcb4684c9408df4eed04d31703b64561..294a97fbec18c38d54cc5f7e9bd6cca5150bb1f7 100644
--- a/remoting/client/server_log_entry_client_unittest.cc
+++ b/remoting/client/server_log_entry_client_unittest.cc
@@ -2,10 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "base/memory/scoped_ptr.h"
+#include "remoting/client/server_log_entry_client.h"
+
+#include <memory>
+
#include "base/strings/stringize_macros.h"
#include "base/sys_info.h"
-#include "remoting/client/server_log_entry_client.h"
#include "remoting/protocol/performance_tracker.h"
#include "remoting/signaling/server_log_entry.h"
#include "remoting/signaling/server_log_entry_unittest.h"
@@ -20,9 +22,9 @@ using remoting::protocol::ConnectionToHost;
namespace remoting {
TEST(ServerLogEntryClientTest, SessionStateChange) {
- scoped_ptr<ServerLogEntry> entry(MakeLogEntryForSessionStateChange(
+ std::unique_ptr<ServerLogEntry> entry(MakeLogEntryForSessionStateChange(
ConnectionToHost::CONNECTED, remoting::protocol::OK));
- scoped_ptr<XmlElement> stanza = entry->ToStanza();
+ std::unique_ptr<XmlElement> stanza = entry->ToStanza();
std::string error;
std::map<std::string, std::string> key_value_pairs;
key_value_pairs["role"] = "client";
@@ -34,9 +36,9 @@ TEST(ServerLogEntryClientTest, SessionStateChange) {
}
TEST(ServerLogEntryClientTest, SessionStateChangeWithError) {
- scoped_ptr<ServerLogEntry> entry(MakeLogEntryForSessionStateChange(
+ std::unique_ptr<ServerLogEntry> entry(MakeLogEntryForSessionStateChange(
ConnectionToHost::FAILED, remoting::protocol::PEER_IS_OFFLINE));
- scoped_ptr<XmlElement> stanza = entry->ToStanza();
+ std::unique_ptr<XmlElement> stanza = entry->ToStanza();
std::string error;
std::map<std::string, std::string> key_value_pairs;
key_value_pairs["role"] = "client";
@@ -50,8 +52,9 @@ TEST(ServerLogEntryClientTest, SessionStateChangeWithError) {
TEST(ServerLogEntryClientTest, Statistics) {
protocol::PerformanceTracker perf_tracker;
- scoped_ptr<ServerLogEntry> entry(MakeLogEntryForStatistics(&perf_tracker));
- scoped_ptr<XmlElement> stanza = entry->ToStanza();
+ std::unique_ptr<ServerLogEntry> entry(
+ MakeLogEntryForStatistics(&perf_tracker));
+ std::unique_ptr<XmlElement> stanza = entry->ToStanza();
std::string error;
std::map<std::string, std::string> key_value_pairs;
key_value_pairs["role"] = "client";
@@ -68,8 +71,8 @@ TEST(ServerLogEntryClientTest, Statistics) {
}
TEST(ServerLogEntryClientTest, SessionIdChanged) {
- scoped_ptr<ServerLogEntry> entry(MakeLogEntryForSessionIdOld("abc"));
- scoped_ptr<XmlElement> stanza = entry->ToStanza();
+ std::unique_ptr<ServerLogEntry> entry(MakeLogEntryForSessionIdOld("abc"));
+ std::unique_ptr<XmlElement> stanza = entry->ToStanza();
std::string error;
std::map<std::string, std::string> key_value_pairs;
key_value_pairs["role"] = "client";
@@ -88,10 +91,10 @@ TEST(ServerLogEntryClientTest, SessionIdChanged) {
}
TEST(ServerLogEntryClientTest, AddClientFields) {
- scoped_ptr<ServerLogEntry> entry(MakeLogEntryForSessionStateChange(
+ std::unique_ptr<ServerLogEntry> entry(MakeLogEntryForSessionStateChange(
ConnectionToHost::CONNECTED, remoting::protocol::OK));
AddClientFieldsToLogEntry(entry.get());
- scoped_ptr<XmlElement> stanza = entry->ToStanza();
+ std::unique_ptr<XmlElement> stanza = entry->ToStanza();
std::string error;
std::map<std::string, std::string> key_value_pairs;
key_value_pairs["role"] = "client";
@@ -107,10 +110,10 @@ TEST(ServerLogEntryClientTest, AddClientFields) {
}
TEST(ServerLogEntryClientTest, AddSessionDuration) {
- scoped_ptr<ServerLogEntry> entry(MakeLogEntryForSessionStateChange(
+ std::unique_ptr<ServerLogEntry> entry(MakeLogEntryForSessionStateChange(
ConnectionToHost::CONNECTED, remoting::protocol::OK));
AddSessionDurationToLogEntry(entry.get(), base::TimeDelta::FromSeconds(123));
- scoped_ptr<XmlElement> stanza = entry->ToStanza();
+ std::unique_ptr<XmlElement> stanza = entry->ToStanza();
std::string error;
std::map<std::string, std::string> key_value_pairs;
key_value_pairs["role"] = "client";
« no previous file with comments | « remoting/client/server_log_entry_client.cc ('k') | remoting/client/software_video_renderer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698