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

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

Issue 7547001: Propagate connected user to web app. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 9 years, 4 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "base/logging.h" 7 #include "base/logging.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/string_number_conversions.h" 9 #include "base/string_number_conversions.h"
10 #include "base/time.h" 10 #include "base/time.h"
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 81
82 void HeartbeatSender::OnSignallingDisconnected() { 82 void HeartbeatSender::OnSignallingDisconnected() {
83 DCHECK_EQ(MessageLoop::current(), message_loop_); 83 DCHECK_EQ(MessageLoop::current(), message_loop_);
84 state_ = STOPPED; 84 state_ = STOPPED;
85 request_.reset(NULL); 85 request_.reset(NULL);
86 } 86 }
87 87
88 // Ignore any notifications other than signalling 88 // Ignore any notifications other than signalling
89 // connected/disconnected events. 89 // connected/disconnected events.
90 void HeartbeatSender::OnAccessDenied() { } 90 void HeartbeatSender::OnAccessDenied() { }
91 void HeartbeatSender::OnAuthenticatedClientsChanged(int clients) { } 91 void HeartbeatSender::OnClientAuthenticated(
92 remoting::protocol::ConnectionToClient* client) { }
93 void HeartbeatSender::OnClientDisconnected(
94 remoting::protocol::ConnectionToClient* client) { }
92 void HeartbeatSender::OnShutdown() { } 95 void HeartbeatSender::OnShutdown() { }
93 96
94 void HeartbeatSender::DoSendStanza() { 97 void HeartbeatSender::DoSendStanza() {
95 DCHECK_EQ(MessageLoop::current(), message_loop_); 98 DCHECK_EQ(MessageLoop::current(), message_loop_);
96 DCHECK_EQ(state_, STARTED); 99 DCHECK_EQ(state_, STARTED);
97 100
98 VLOG(1) << "Sending heartbeat stanza to " << kChromotingBotJid; 101 VLOG(1) << "Sending heartbeat stanza to " << kChromotingBotJid;
99 request_->SendIq(buzz::STR_SET, kChromotingBotJid, CreateHeartbeatMessage()); 102 request_->SendIq(buzz::STR_SET, kChromotingBotJid, CreateHeartbeatMessage());
100 } 103 }
101 104
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 QName(kChromotingXmlNamespace, kSignatureTimeAttr), time_str); 165 QName(kChromotingXmlNamespace, kSignatureTimeAttr), time_str);
163 166
164 std::string message = full_jid_ + ' ' + time_str; 167 std::string message = full_jid_ + ' ' + time_str;
165 std::string signature(key_pair_.GetSignature(message)); 168 std::string signature(key_pair_.GetSignature(message));
166 signature_tag->AddText(signature); 169 signature_tag->AddText(signature);
167 170
168 return signature_tag; 171 return signature_tag;
169 } 172 }
170 173
171 } // namespace remoting 174 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698