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

Side by Side Diff: remoting/host/it2me/it2me_host.h

Issue 2901033002: Host port range policy is no longer ignored in it2me host (Closed)
Patch Set: Created 3 years, 6 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
« no previous file with comments | « no previous file | remoting/host/it2me/it2me_host.cc » ('j') | remoting/host/it2me/it2me_host.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #ifndef REMOTING_HOST_IT2ME_IT2ME_HOST_H_ 5 #ifndef REMOTING_HOST_IT2ME_IT2ME_HOST_H_
6 #define REMOTING_HOST_IT2ME_IT2ME_HOST_H_ 6 #define REMOTING_HOST_IT2ME_IT2ME_HOST_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "base/memory/ref_counted.h" 13 #include "base/memory/ref_counted.h"
14 #include "base/memory/weak_ptr.h" 14 #include "base/memory/weak_ptr.h"
15 #include "remoting/host/host_status_observer.h" 15 #include "remoting/host/host_status_observer.h"
16 #include "remoting/host/it2me/it2me_confirmation_dialog.h" 16 #include "remoting/host/it2me/it2me_confirmation_dialog.h"
17 #include "remoting/host/it2me/it2me_confirmation_dialog_proxy.h" 17 #include "remoting/host/it2me/it2me_confirmation_dialog_proxy.h"
18 #include "remoting/protocol/port_range.h"
18 #include "remoting/protocol/validating_authenticator.h" 19 #include "remoting/protocol/validating_authenticator.h"
19 #include "remoting/signaling/xmpp_signal_strategy.h" 20 #include "remoting/signaling/xmpp_signal_strategy.h"
20 21
21 namespace base { 22 namespace base {
22 class DictionaryValue; 23 class DictionaryValue;
23 } 24 }
24 25
25 namespace remoting { 26 namespace remoting {
26 27
27 class ChromotingHost; 28 class ChromotingHost;
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 // Called when the support host registration completes. 126 // Called when the support host registration completes.
126 void OnReceivedSupportID(const std::string& support_id, 127 void OnReceivedSupportID(const std::string& support_id,
127 const base::TimeDelta& lifetime, 128 const base::TimeDelta& lifetime,
128 const std::string& error_message); 129 const std::string& error_message);
129 130
130 // Handlers for NAT traversal and domain policies. 131 // Handlers for NAT traversal and domain policies.
131 void UpdateNatPolicy(bool nat_traversal_enabled); 132 void UpdateNatPolicy(bool nat_traversal_enabled);
132 void UpdateHostDomainListPolicy(std::vector<std::string> host_domain_list); 133 void UpdateHostDomainListPolicy(std::vector<std::string> host_domain_list);
133 void UpdateClientDomainListPolicy( 134 void UpdateClientDomainListPolicy(
134 std::vector<std::string> client_domain_list); 135 std::vector<std::string> client_domain_list);
136 void UpdateHostUdpPortRangePolicy(std::string port_range_string);
135 137
136 void DisconnectOnNetworkThread(); 138 void DisconnectOnNetworkThread();
137 139
138 // Uses details of the connection and current policies to determine if the 140 // Uses details of the connection and current policies to determine if the
139 // connection should be accepted or rejected. 141 // connection should be accepted or rejected.
140 void ValidateConnectionDetails( 142 void ValidateConnectionDetails(
141 const std::string& remote_jid, 143 const std::string& remote_jid,
142 const protocol::ValidatingAuthenticator::ResultCallback& result_callback); 144 const protocol::ValidatingAuthenticator::ResultCallback& result_callback);
143 145
144 // Caller supplied fields. 146 // Caller supplied fields.
(...skipping 17 matching lines...) Expand all
162 std::unique_ptr<It2MeConfirmationDialogFactory> confirmation_dialog_factory_; 164 std::unique_ptr<It2MeConfirmationDialogFactory> confirmation_dialog_factory_;
163 std::unique_ptr<It2MeConfirmationDialogProxy> confirmation_dialog_proxy_; 165 std::unique_ptr<It2MeConfirmationDialogProxy> confirmation_dialog_proxy_;
164 166
165 // Host the current nat traversal policy setting. 167 // Host the current nat traversal policy setting.
166 bool nat_traversal_enabled_ = false; 168 bool nat_traversal_enabled_ = false;
167 169
168 // The client and host domain policy setting. 170 // The client and host domain policy setting.
169 std::vector<std::string> required_client_domain_list_; 171 std::vector<std::string> required_client_domain_list_;
170 std::vector<std::string> required_host_domain_list_; 172 std::vector<std::string> required_host_domain_list_;
171 173
174 // The host port range policy setting.
175 PortRange udp_port_range_;
176
172 // Tracks the JID of the remote user when in a connecting state. 177 // Tracks the JID of the remote user when in a connecting state.
173 std::string connecting_jid_; 178 std::string connecting_jid_;
174 179
175 // Indicates whether or not a policy has ever been read. This is to ensure 180 // Indicates whether or not a policy has ever been read. This is to ensure
176 // that on startup, we do not accidentally start a connection before we have 181 // that on startup, we do not accidentally start a connection before we have
177 // queried our policy restrictions. 182 // queried our policy restrictions.
178 bool policy_received_ = false; 183 bool policy_received_ = false;
179 184
180 // On startup, it is possible to have Connect() called before the policy read 185 // On startup, it is possible to have Connect() called before the policy read
181 // is completed. Rather than just failing, we thunk the connection call so 186 // is completed. Rather than just failing, we thunk the connection call so
(...skipping 18 matching lines...) Expand all
200 const std::string& username, 205 const std::string& username,
201 const std::string& directory_bot_jid); 206 const std::string& directory_bot_jid);
202 207
203 private: 208 private:
204 DISALLOW_COPY_AND_ASSIGN(It2MeHostFactory); 209 DISALLOW_COPY_AND_ASSIGN(It2MeHostFactory);
205 }; 210 };
206 211
207 } // namespace remoting 212 } // namespace remoting
208 213
209 #endif // REMOTING_HOST_IT2ME_IT2ME_HOST_H_ 214 #endif // REMOTING_HOST_IT2ME_IT2ME_HOST_H_
OLDNEW
« no previous file with comments | « no previous file | remoting/host/it2me/it2me_host.cc » ('j') | remoting/host/it2me/it2me_host.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698