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

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

Issue 15782010: Update remoting/ and jingle/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « remoting/host/desktop_session_proxy.cc ('k') | remoting/host/heartbeat_sender_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 (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 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 signal_strategy_(signal_strategy), 58 signal_strategy_(signal_strategy),
59 key_pair_(key_pair), 59 key_pair_(key_pair),
60 directory_bot_jid_(directory_bot_jid), 60 directory_bot_jid_(directory_bot_jid),
61 interval_ms_(kDefaultHeartbeatIntervalMs), 61 interval_ms_(kDefaultHeartbeatIntervalMs),
62 sequence_id_(0), 62 sequence_id_(0),
63 sequence_id_was_set_(false), 63 sequence_id_was_set_(false),
64 sequence_id_recent_set_num_(0), 64 sequence_id_recent_set_num_(0),
65 heartbeat_succeeded_(false), 65 heartbeat_succeeded_(false),
66 failed_startup_heartbeat_count_(0) { 66 failed_startup_heartbeat_count_(0) {
67 DCHECK(signal_strategy_); 67 DCHECK(signal_strategy_);
68 DCHECK(key_pair_); 68 DCHECK(key_pair_.get());
69 69
70 signal_strategy_->AddListener(this); 70 signal_strategy_->AddListener(this);
71 71
72 // Start heartbeats if the |signal_strategy_| is already connected. 72 // Start heartbeats if the |signal_strategy_| is already connected.
73 OnSignalStrategyStateChange(signal_strategy_->GetState()); 73 OnSignalStrategyStateChange(signal_strategy_->GetState());
74 } 74 }
75 75
76 HeartbeatSender::~HeartbeatSender() { 76 HeartbeatSender::~HeartbeatSender() {
77 signal_strategy_->RemoveListener(this); 77 signal_strategy_->RemoveListener(this);
78 } 78 }
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 264
265 std::string message = signal_strategy_->GetLocalJid() + ' ' + 265 std::string message = signal_strategy_->GetLocalJid() + ' ' +
266 base::IntToString(sequence_id_); 266 base::IntToString(sequence_id_);
267 std::string signature(key_pair_->SignMessage(message)); 267 std::string signature(key_pair_->SignMessage(message));
268 signature_tag->AddText(signature); 268 signature_tag->AddText(signature);
269 269
270 return signature_tag.Pass(); 270 return signature_tag.Pass();
271 } 271 }
272 272
273 } // namespace remoting 273 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/desktop_session_proxy.cc ('k') | remoting/host/heartbeat_sender_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698