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

Unified Diff: remoting/client/client_status_logger.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
Index: remoting/client/client_status_logger.cc
diff --git a/remoting/client/client_status_logger.cc b/remoting/client/client_status_logger.cc
index c7cc0fe00d4ade1e540fb16666f67bb8719e33fa..74a4a69c4971ea309c785e03bd6b3e7402ea0899 100644
--- a/remoting/client/client_status_logger.cc
+++ b/remoting/client/client_status_logger.cc
@@ -57,7 +57,7 @@ void ClientStatusLogger::LogSessionStateChange(
protocol::ErrorCode error) {
DCHECK(CalledOnValidThread());
- scoped_ptr<ServerLogEntry> entry(
+ std::unique_ptr<ServerLogEntry> entry(
MakeLogEntryForSessionStateChange(state, error));
AddClientFieldsToLogEntry(entry.get());
entry->AddModeField(log_to_server_.mode());
@@ -97,7 +97,8 @@ void ClientStatusLogger::LogStatistics(
MaybeExpireSessionId();
- scoped_ptr<ServerLogEntry> entry(MakeLogEntryForStatistics(perf_tracker));
+ std::unique_ptr<ServerLogEntry> entry(
+ MakeLogEntryForStatistics(perf_tracker));
AddClientFieldsToLogEntry(entry.get());
entry->AddModeField(log_to_server_.mode());
AddSessionIdToLogEntry(entry.get(), session_id_);
@@ -125,7 +126,8 @@ void ClientStatusLogger::MaybeExpireSessionId() {
base::TimeDelta max_age = base::TimeDelta::FromDays(kMaxSessionIdAgeDays);
if (base::TimeTicks::Now() - session_id_generation_time_ > max_age) {
// Log the old session ID.
- scoped_ptr<ServerLogEntry> entry(MakeLogEntryForSessionIdOld(session_id_));
+ std::unique_ptr<ServerLogEntry> entry(
+ MakeLogEntryForSessionIdOld(session_id_));
entry->AddModeField(log_to_server_.mode());
log_to_server_.Log(*entry.get());
« no previous file with comments | « remoting/client/chromoting_client_runtime_unittest.cc ('k') | remoting/client/client_status_logger_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698