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

Unified Diff: remoting/protocol/network_settings.h

Issue 966433002: Malformed PortRange or ThirdPartyAuthConfig trigger OnPolicyError. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing a Windows-specific, pre-processor-related build break. Created 5 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/me2me_host_authenticator_factory.cc ('k') | remoting/protocol/network_settings.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/network_settings.h
diff --git a/remoting/protocol/network_settings.h b/remoting/protocol/network_settings.h
index f64958aa519ff65dd22ab38dd6a8e234db15cc88..83d750761ffc4ed96aef132244833024e8761d7a 100644
--- a/remoting/protocol/network_settings.h
+++ b/remoting/protocol/network_settings.h
@@ -9,6 +9,7 @@
#include "base/basictypes.h"
#include "base/logging.h"
+#include "remoting/protocol/port_range.h"
namespace remoting {
namespace protocol {
@@ -42,32 +43,17 @@ struct NetworkSettings {
NAT_TRAVERSAL_OUTGOING
};
- NetworkSettings()
- : flags(NAT_TRAVERSAL_DISABLED),
- min_port(0),
- max_port(0) {
+ NetworkSettings() : flags(NAT_TRAVERSAL_DISABLED) {
DCHECK(!(flags & (NAT_TRAVERSAL_STUN | NAT_TRAVERSAL_RELAY)) ||
(flags & NAT_TRAVERSAL_OUTGOING));
}
- explicit NetworkSettings(uint32 flags)
- : flags(flags),
- min_port(0),
- max_port(0) {
- }
-
- // Parse string in the form "<min_port>-<max_port>". E.g. "12400-12409".
- // Returns true if string was parsed successfuly.
- static bool ParsePortRange(const std::string& port_range,
- uint16* out_min_port,
- uint16* out_max_port);
+ explicit NetworkSettings(uint32 flags) : flags(flags) {}
uint32 flags;
- // |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.
- uint16 min_port;
- uint16 max_port;
+ // Range of ports used by P2P sessions.
+ PortRange port_range;
};
} // namespace protocol
« no previous file with comments | « remoting/protocol/me2me_host_authenticator_factory.cc ('k') | remoting/protocol/network_settings.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698