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

Unified Diff: remoting/protocol/session_manager.h

Issue 9549029: Set incoming_only flag on the host side when NAT traversal is disabled. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix unittests Created 8 years, 10 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/protocol/pepper_transport_factory.cc ('k') | remoting/protocol/transport_config.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/session_manager.h
diff --git a/remoting/protocol/session_manager.h b/remoting/protocol/session_manager.h
index 1f6323e7b272251d9b44a7f4ba365ede0988da70..cac11f0b936d1dd2136ae04b2b339c2cd95bac49 100644
--- a/remoting/protocol/session_manager.h
+++ b/remoting/protocol/session_manager.h
@@ -59,6 +59,7 @@
#include "base/memory/ref_counted.h"
#include "base/threading/non_thread_safe.h"
#include "remoting/protocol/session.h"
+#include "remoting/protocol/transport_config.h"
namespace remoting {
@@ -72,18 +73,25 @@ class AuthenticatorFactory;
// TODO(sergeyu): Remove this struct and use TransportConfig instead.
struct NetworkSettings {
NetworkSettings()
- : allow_nat_traversal(false),
+ : nat_traversal_mode(TransportConfig::NAT_TRAVERSAL_DISABLED),
+ max_port(0) {
+ }
+
+ explicit NetworkSettings(bool allow_nat_traversal)
+ : nat_traversal_mode(allow_nat_traversal ?
+ TransportConfig::NAT_TRAVERSAL_ENABLED :
+ TransportConfig::NAT_TRAVERSAL_DISABLED),
min_port(0),
max_port(0) {
}
- explicit NetworkSettings(bool allow_nat_traversal_value)
- : allow_nat_traversal(allow_nat_traversal_value),
+ explicit NetworkSettings(TransportConfig::NatTraversalMode nat_traversal_mode)
+ : nat_traversal_mode(nat_traversal_mode),
min_port(0),
max_port(0) {
}
- bool allow_nat_traversal;
+ TransportConfig::NatTraversalMode nat_traversal_mode;
// |min_port| and |max_port| specify range (inclusive) of ports used by
// P2P sessions. Any port can be used when both values are set to 0.
« no previous file with comments | « remoting/protocol/pepper_transport_factory.cc ('k') | remoting/protocol/transport_config.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698