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

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

Issue 1643793002: Add policy to restrict client domain for Me2Me. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix remoting_perftests compile. Created 4 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 unified diff | Download patch
« no previous file with comments | « components/policy/resources/policy_templates.json ('k') | remoting/host/it2me/it2me_host.cc » ('j') | no next file with comments »
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 "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 void OnReceivedSupportID(const std::string& support_id, 126 void OnReceivedSupportID(const std::string& support_id,
127 const base::TimeDelta& lifetime, 127 const base::TimeDelta& lifetime,
128 const std::string& error_message); 128 const std::string& error_message);
129 129
130 // Called when initial policies are read, and when they change. 130 // Called when initial policies are read, and when they change.
131 void OnPolicyUpdate(scoped_ptr<base::DictionaryValue> policies); 131 void OnPolicyUpdate(scoped_ptr<base::DictionaryValue> policies);
132 132
133 // Called when malformed policies are detected. 133 // Called when malformed policies are detected.
134 void OnPolicyError(); 134 void OnPolicyError();
135 135
136 // Handlers for NAT traversal and host domain policies. 136 // Handlers for NAT traversal and domain policies.
137 void UpdateNatPolicy(bool nat_traversal_enabled); 137 void UpdateNatPolicy(bool nat_traversal_enabled);
138 void UpdateHostDomainPolicy(const std::string& host_domain); 138 void UpdateHostDomainPolicy(const std::string& host_domain);
139 void UpdateClientDomainPolicy(const std::string& client_domain);
139 140
140 void Shutdown(); 141 void Shutdown();
141 142
142 // Caller supplied fields. 143 // Caller supplied fields.
143 scoped_ptr<ChromotingHostContext> host_context_; 144 scoped_ptr<ChromotingHostContext> host_context_;
144 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; 145 scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
145 base::WeakPtr<It2MeHost::Observer> observer_; 146 base::WeakPtr<It2MeHost::Observer> observer_;
146 XmppSignalStrategy::XmppServerConfig xmpp_server_config_; 147 XmppSignalStrategy::XmppServerConfig xmpp_server_config_;
147 std::string directory_bot_jid_; 148 std::string directory_bot_jid_;
148 149
149 It2MeHostState state_; 150 It2MeHostState state_;
150 151
151 scoped_refptr<RsaKeyPair> host_key_pair_; 152 scoped_refptr<RsaKeyPair> host_key_pair_;
152 scoped_ptr<SignalStrategy> signal_strategy_; 153 scoped_ptr<SignalStrategy> signal_strategy_;
153 scoped_ptr<RegisterSupportHostRequest> register_request_; 154 scoped_ptr<RegisterSupportHostRequest> register_request_;
154 scoped_ptr<HostStatusLogger> host_status_logger_; 155 scoped_ptr<HostStatusLogger> host_status_logger_;
155 scoped_ptr<DesktopEnvironmentFactory> desktop_environment_factory_; 156 scoped_ptr<DesktopEnvironmentFactory> desktop_environment_factory_;
156 scoped_ptr<HostEventLogger> host_event_logger_; 157 scoped_ptr<HostEventLogger> host_event_logger_;
157 158
158 scoped_ptr<ChromotingHost> host_; 159 scoped_ptr<ChromotingHost> host_;
159 int failed_login_attempts_; 160 int failed_login_attempts_;
160 161
161 scoped_ptr<PolicyWatcher> policy_watcher_; 162 scoped_ptr<PolicyWatcher> policy_watcher_;
162 scoped_ptr<It2MeConfirmationDialogFactory> confirmation_dialog_factory_; 163 scoped_ptr<It2MeConfirmationDialogFactory> confirmation_dialog_factory_;
163 scoped_ptr<It2MeConfirmationDialogProxy> confirmation_dialog_proxy_; 164 scoped_ptr<It2MeConfirmationDialogProxy> confirmation_dialog_proxy_;
164 165
165 // Host the current nat traversal policy setting. 166 // Host the current nat traversal policy setting.
166 bool nat_traversal_enabled_; 167 bool nat_traversal_enabled_;
167 168
168 // The host domain policy setting. 169 // The client and host domain policy setting.
170 std::string required_client_domain_;
169 std::string required_host_domain_; 171 std::string required_host_domain_;
170 172
171 // Indicates whether or not a policy has ever been read. This is to ensure 173 // Indicates whether or not a policy has ever been read. This is to ensure
172 // that on startup, we do not accidentally start a connection before we have 174 // that on startup, we do not accidentally start a connection before we have
173 // queried our policy restrictions. 175 // queried our policy restrictions.
174 bool policy_received_; 176 bool policy_received_;
175 177
176 // On startup, it is possible to have Connect() called before the policy read 178 // On startup, it is possible to have Connect() called before the policy read
177 // is completed. Rather than just failing, we thunk the connection call so 179 // is completed. Rather than just failing, we thunk the connection call so
178 // it can be executed after at least one successful policy read. This 180 // it can be executed after at least one successful policy read. This
(...skipping 24 matching lines...) Expand all
203 const std::string& directory_bot_jid); 205 const std::string& directory_bot_jid);
204 206
205 private: 207 private:
206 policy::PolicyService* policy_service_; 208 policy::PolicyService* policy_service_;
207 DISALLOW_COPY_AND_ASSIGN(It2MeHostFactory); 209 DISALLOW_COPY_AND_ASSIGN(It2MeHostFactory);
208 }; 210 };
209 211
210 } // namespace remoting 212 } // namespace remoting
211 213
212 #endif // REMOTING_HOST_IT2ME_IT2ME_HOST_H_ 214 #endif // REMOTING_HOST_IT2ME_IT2ME_HOST_H_
OLDNEW
« no previous file with comments | « components/policy/resources/policy_templates.json ('k') | remoting/host/it2me/it2me_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698