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

Side by Side Diff: remoting/host/heartbeat_sender.cc

Issue 1549493004: Use std::move() instead of .Pass() in remoting/host (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move_not_pass
Patch Set: include <utility> Created 4 years, 12 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/heartbeat_sender.h" 5 #include "remoting/host/heartbeat_sender.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 QName(kChromotingXmlNamespace, kHostOperatingSystemVersionTag))); 335 QName(kChromotingXmlNamespace, kHostOperatingSystemVersionTag)));
336 os_version_tag->AddText(GetHostOperatingSystemVersion()); 336 os_version_tag->AddText(GetHostOperatingSystemVersion());
337 heartbeat->AddElement(os_version_tag.release()); 337 heartbeat->AddElement(os_version_tag.release());
338 } 338 }
339 // Append log message (which isn't signed). 339 // Append log message (which isn't signed).
340 scoped_ptr<XmlElement> log(ServerLogEntry::MakeStanza()); 340 scoped_ptr<XmlElement> log(ServerLogEntry::MakeStanza());
341 scoped_ptr<ServerLogEntry> log_entry(MakeLogEntryForHeartbeat()); 341 scoped_ptr<ServerLogEntry> log_entry(MakeLogEntryForHeartbeat());
342 AddHostFieldsToLogEntry(log_entry.get()); 342 AddHostFieldsToLogEntry(log_entry.get());
343 log->AddElement(log_entry->ToStanza().release()); 343 log->AddElement(log_entry->ToStanza().release());
344 heartbeat->AddElement(log.release()); 344 heartbeat->AddElement(log.release());
345 return heartbeat.Pass(); 345 return heartbeat;
346 } 346 }
347 347
348 scoped_ptr<XmlElement> HeartbeatSender::CreateSignature() { 348 scoped_ptr<XmlElement> HeartbeatSender::CreateSignature() {
349 scoped_ptr<XmlElement> signature_tag(new XmlElement( 349 scoped_ptr<XmlElement> signature_tag(new XmlElement(
350 QName(kChromotingXmlNamespace, kHeartbeatSignatureTag))); 350 QName(kChromotingXmlNamespace, kHeartbeatSignatureTag)));
351 351
352 std::string message = NormalizeJid(signal_strategy_->GetLocalJid()) + ' ' + 352 std::string message = NormalizeJid(signal_strategy_->GetLocalJid()) + ' ' +
353 base::IntToString(sequence_id_); 353 base::IntToString(sequence_id_);
354 std::string signature(host_key_pair_->SignMessage(message)); 354 std::string signature(host_key_pair_->SignMessage(message));
355 signature_tag->AddText(signature); 355 signature_tag->AddText(signature);
356 356
357 return signature_tag.Pass(); 357 return signature_tag;
358 } 358 }
359 359
360 } // namespace remoting 360 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/gnubby_socket.cc ('k') | remoting/host/host_change_notification_listener_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698