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

Side by Side Diff: remoting/host/host_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 unified diff | Download patch
« no previous file with comments | « remoting/host/host_mock_objects.cc ('k') | remoting/host/host_status_logger_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "remoting/host/host_status_logger.h" 5 #include "remoting/host/host_status_logger.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "remoting/base/constants.h" 8 #include "remoting/base/constants.h"
9 #include "remoting/host/host_status_monitor.h" 9 #include "remoting/host/host_status_monitor.h"
10 #include "remoting/host/server_log_entry_host.h" 10 #include "remoting/host/server_log_entry_host.h"
(...skipping 13 matching lines...) Expand all
24 24
25 HostStatusLogger::~HostStatusLogger() { 25 HostStatusLogger::~HostStatusLogger() {
26 if (monitor_.get()) 26 if (monitor_.get())
27 monitor_->RemoveStatusObserver(this); 27 monitor_->RemoveStatusObserver(this);
28 } 28 }
29 29
30 void HostStatusLogger::LogSessionStateChange(const std::string& jid, 30 void HostStatusLogger::LogSessionStateChange(const std::string& jid,
31 bool connected) { 31 bool connected) {
32 DCHECK(CalledOnValidThread()); 32 DCHECK(CalledOnValidThread());
33 33
34 scoped_ptr<ServerLogEntry> entry( 34 std::unique_ptr<ServerLogEntry> entry(
35 MakeLogEntryForSessionStateChange(connected)); 35 MakeLogEntryForSessionStateChange(connected));
36 AddHostFieldsToLogEntry(entry.get()); 36 AddHostFieldsToLogEntry(entry.get());
37 entry->AddModeField(log_to_server_.mode()); 37 entry->AddModeField(log_to_server_.mode());
38 38
39 if (connected && connection_route_type_.count(jid) > 0) 39 if (connected && connection_route_type_.count(jid) > 0)
40 AddConnectionTypeToLogEntry(entry.get(), connection_route_type_[jid]); 40 AddConnectionTypeToLogEntry(entry.get(), connection_route_type_[jid]);
41 41
42 log_to_server_.Log(*entry.get()); 42 log_to_server_.Log(*entry.get());
43 } 43 }
44 44
(...skipping 17 matching lines...) Expand all
62 if (channel_name == kVideoChannelName) { 62 if (channel_name == kVideoChannelName) {
63 connection_route_type_[jid] = route.type; 63 connection_route_type_[jid] = route.type;
64 } 64 }
65 } 65 }
66 66
67 void HostStatusLogger::SetSignalingStateForTest(SignalStrategy::State state) { 67 void HostStatusLogger::SetSignalingStateForTest(SignalStrategy::State state) {
68 log_to_server_.OnSignalStrategyStateChange(state); 68 log_to_server_.OnSignalStrategyStateChange(state);
69 } 69 }
70 70
71 } // namespace remoting 71 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/host_mock_objects.cc ('k') | remoting/host/host_status_logger_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698