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

Unified Diff: remoting/client/plugin/delegating_signal_strategy.cc

Issue 530213004: Use XMPP in V2 webapp (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
« no previous file with comments | « remoting/client/plugin/delegating_signal_strategy.h ('k') | remoting/remoting_webapp_files.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/client/plugin/delegating_signal_strategy.cc
diff --git a/remoting/client/plugin/delegating_signal_strategy.cc b/remoting/client/plugin/delegating_signal_strategy.cc
index 7129341a598ac1c670b34b33c4ecf24b02498175..18efb6d81e8a4dae2e1f30fff32a499c73b4c4a4 100644
--- a/remoting/client/plugin/delegating_signal_strategy.cc
+++ b/remoting/client/plugin/delegating_signal_strategy.cc
@@ -4,6 +4,7 @@
#include "remoting/client/plugin/delegating_signal_strategy.h"
+#include "base/rand_util.h"
#include "base/strings/string_number_conversions.h"
#include "third_party/libjingle/source/talk/xmllite/xmlelement.h"
@@ -13,8 +14,7 @@ DelegatingSignalStrategy::DelegatingSignalStrategy(
std::string local_jid,
const SendIqCallback& send_iq_callback)
: local_jid_(local_jid),
- send_iq_callback_(send_iq_callback),
- last_id_(0) {
+ send_iq_callback_(send_iq_callback) {
}
DelegatingSignalStrategy::~DelegatingSignalStrategy() {
@@ -67,8 +67,7 @@ bool DelegatingSignalStrategy::SendStanza(scoped_ptr<buzz::XmlElement> stanza) {
}
std::string DelegatingSignalStrategy::GetNextId() {
- ++last_id_;
- return base::IntToString(last_id_);
+ return base::Uint64ToString(base::RandUint64());
}
} // namespace remoting
« no previous file with comments | « remoting/client/plugin/delegating_signal_strategy.h ('k') | remoting/remoting_webapp_files.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698