| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/protocol/jingle_info_request.h" | 5 #include "remoting/protocol/jingle_info_request.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
| 11 #include "base/stl_util.h" | 11 #include "base/stl_util.h" |
| 12 #include "base/strings/string_number_conversions.h" | 12 #include "base/strings/string_number_conversions.h" |
| 13 #include "base/time/time.h" | 13 #include "base/time/time.h" |
| 14 #include "remoting/protocol/ice_config.h" | 14 #include "remoting/protocol/ice_config.h" |
| 15 #include "remoting/signaling/iq_sender.h" | 15 #include "remoting/signaling/iq_sender.h" |
| 16 #include "third_party/webrtc/base/socketaddress.h" | 16 #include "third_party/webrtc/base/socketaddress.h" |
| 17 #include "third_party/webrtc/libjingle/xmllite/xmlelement.h" | 17 #include "third_party/xmllite/xmlelement.h" |
| 18 #include "third_party/webrtc/libjingle/xmpp/constants.h" | 18 #include "third_party/xmpp/constants.h" |
| 19 | 19 |
| 20 namespace remoting { | 20 namespace remoting { |
| 21 namespace protocol { | 21 namespace protocol { |
| 22 | 22 |
| 23 const int kRequestTimeoutSeconds = 5; | 23 const int kRequestTimeoutSeconds = 5; |
| 24 | 24 |
| 25 // Get fresh STUN/Relay configuration every hour. | 25 // Get fresh STUN/Relay configuration every hour. |
| 26 static const int kJingleInfoUpdatePeriodSeconds = 3600; | 26 static const int kJingleInfoUpdatePeriodSeconds = 3600; |
| 27 | 27 |
| 28 JingleInfoRequest::JingleInfoRequest(SignalStrategy* signal_strategy) | 28 JingleInfoRequest::JingleInfoRequest(SignalStrategy* signal_strategy) |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 | 101 |
| 102 result.expiration_time = | 102 result.expiration_time = |
| 103 base::Time::Now() + | 103 base::Time::Now() + |
| 104 base::TimeDelta::FromSeconds(kJingleInfoUpdatePeriodSeconds); | 104 base::TimeDelta::FromSeconds(kJingleInfoUpdatePeriodSeconds); |
| 105 | 105 |
| 106 on_ice_config_callback_.Run(result); | 106 on_ice_config_callback_.Run(result); |
| 107 } | 107 } |
| 108 | 108 |
| 109 } // namespace protocol | 109 } // namespace protocol |
| 110 } // namespace remoting | 110 } // namespace remoting |
| OLD | NEW |