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

Unified Diff: remoting/host/server_log_entry_host_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/host/server_log_entry_host.cc ('k') | remoting/host/setup/daemon_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/server_log_entry_host_unittest.cc
diff --git a/remoting/host/server_log_entry_host_unittest.cc b/remoting/host/server_log_entry_host_unittest.cc
index 59f6709b280e9bb8b9ca8217d9109fc069c60912..f70d4311b06229e98fc6ec64ef9fa1724e648b5e 100644
--- a/remoting/host/server_log_entry_host_unittest.cc
+++ b/remoting/host/server_log_entry_host_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/host/server_log_entry_host.h"
+
+#include <memory>
+
#include "base/strings/stringize_macros.h"
#include "build/build_config.h"
-#include "remoting/host/server_log_entry_host.h"
#include "remoting/signaling/server_log_entry.h"
#include "remoting/signaling/server_log_entry_unittest.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -17,8 +19,9 @@ using buzz::XmlElement;
namespace remoting {
TEST(ServerLogEntryHostTest, MakeForSessionStateChange) {
- scoped_ptr<ServerLogEntry> entry(MakeLogEntryForSessionStateChange(true));
- scoped_ptr<XmlElement> stanza = entry->ToStanza();
+ std::unique_ptr<ServerLogEntry> entry(
+ MakeLogEntryForSessionStateChange(true));
+ std::unique_ptr<XmlElement> stanza = entry->ToStanza();
std::string error;
std::map<std::string, std::string> key_value_pairs;
key_value_pairs["role"] = "host";
@@ -30,8 +33,8 @@ TEST(ServerLogEntryHostTest, MakeForSessionStateChange) {
}
TEST(ServerLogEntryHostTest, MakeForHeartbeat) {
- scoped_ptr<ServerLogEntry> entry(MakeLogEntryForHeartbeat());
- scoped_ptr<XmlElement> stanza = entry->ToStanza();
+ std::unique_ptr<ServerLogEntry> entry(MakeLogEntryForHeartbeat());
+ std::unique_ptr<XmlElement> stanza = entry->ToStanza();
std::string error;
std::map<std::string, std::string> key_value_pairs;
key_value_pairs["role"] = "host";
@@ -42,9 +45,10 @@ TEST(ServerLogEntryHostTest, MakeForHeartbeat) {
}
TEST(ServerLogEntryHostTest, AddHostFields) {
- scoped_ptr<ServerLogEntry> entry(MakeLogEntryForSessionStateChange(true));
+ std::unique_ptr<ServerLogEntry> entry(
+ MakeLogEntryForSessionStateChange(true));
AddHostFieldsToLogEntry(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"] = "host";
@@ -77,9 +81,10 @@ TEST(ServerLogEntryHostTest, AddHostFields) {
}
TEST(ServerLogEntryHostTest, AddModeField1) {
- scoped_ptr<ServerLogEntry> entry(MakeLogEntryForSessionStateChange(true));
+ std::unique_ptr<ServerLogEntry> entry(
+ MakeLogEntryForSessionStateChange(true));
entry->AddModeField(ServerLogEntry::IT2ME);
- 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"] = "host";
@@ -92,9 +97,10 @@ TEST(ServerLogEntryHostTest, AddModeField1) {
}
TEST(ServerLogEntryHostTest, AddModeField2) {
- scoped_ptr<ServerLogEntry> entry(MakeLogEntryForSessionStateChange(true));
+ std::unique_ptr<ServerLogEntry> entry(
+ MakeLogEntryForSessionStateChange(true));
entry->AddModeField(ServerLogEntry::ME2ME);
- 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"] = "host";
« no previous file with comments | « remoting/host/server_log_entry_host.cc ('k') | remoting/host/setup/daemon_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698