Chromium Code Reviews| OLD | NEW | 
|---|---|
| 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 #include "remoting/host/it2me/it2me_host.h" | 5 #include "remoting/host/it2me/it2me_host.h" | 
| 6 | 6 | 
| 7 #include <cstdint> | 7 #include <cstdint> | 
| 8 #include <memory> | 8 #include <memory> | 
| 9 #include <string> | 9 #include <string> | 
| 10 #include <utility> | 10 #include <utility> | 
| (...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 249 SetState(kRequestedAccessCode, ""); | 249 SetState(kRequestedAccessCode, ""); | 
| 250 return; | 250 return; | 
| 251 } | 251 } | 
| 252 | 252 | 
| 253 void It2MeHost::OnAccessDenied(const std::string& jid) { | 253 void It2MeHost::OnAccessDenied(const std::string& jid) { | 
| 254 DCHECK(host_context_->network_task_runner()->BelongsToCurrentThread()); | 254 DCHECK(host_context_->network_task_runner()->BelongsToCurrentThread()); | 
| 255 | 255 | 
| 256 ++failed_login_attempts_; | 256 ++failed_login_attempts_; | 
| 257 if (failed_login_attempts_ == kMaxLoginAttempts) { | 257 if (failed_login_attempts_ == kMaxLoginAttempts) { | 
| 258 DisconnectOnNetworkThread(); | 258 DisconnectOnNetworkThread(); | 
| 259 } else if (confirmation_dialog_proxy_) { | |
| 
 
Sergey Ulanov
2017/01/20 20:05:43
Can we just delete ConfirmationDialogProxy? ( i.e.
 
joedow
2017/03/14 16:46:36
Acknowledged.
 
 | |
| 260 confirmation_dialog_proxy_->Cancel(); | |
| 
 
Sergey Ulanov
2017/01/20 20:05:43
If I understand correctly this will call OnConfirm
 
joedow
2017/03/14 16:46:36
resetting the proxy will prevent the dialog result
 
 | |
| 259 } | 261 } | 
| 260 } | 262 } | 
| 261 | 263 | 
| 262 void It2MeHost::OnClientConnected(const std::string& jid) { | 264 void It2MeHost::OnClientConnected(const std::string& jid) { | 
| 263 DCHECK(host_context_->network_task_runner()->BelongsToCurrentThread()); | 265 DCHECK(host_context_->network_task_runner()->BelongsToCurrentThread()); | 
| 264 | 266 | 
| 265 // ChromotingHost doesn't allow multiple concurrent connection and the | 267 // ChromotingHost doesn't allow multiple concurrent connection and the | 
| 266 // host is destroyed in OnClientDisconnected() after the first connection. | 268 // host is destroyed in OnClientDisconnected() after the first connection. | 
| 267 CHECK_NE(state_, kConnected); | 269 CHECK_NE(state_, kConnected); | 
| 268 | 270 | 
| (...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 560 DCHECK(context->ui_task_runner()->BelongsToCurrentThread()); | 562 DCHECK(context->ui_task_runner()->BelongsToCurrentThread()); | 
| 561 | 563 | 
| 562 std::unique_ptr<PolicyWatcher> policy_watcher = | 564 std::unique_ptr<PolicyWatcher> policy_watcher = | 
| 563 PolicyWatcher::Create(policy_service, context->file_task_runner()); | 565 PolicyWatcher::Create(policy_service, context->file_task_runner()); | 
| 564 return new It2MeHost(std::move(context), std::move(policy_watcher), | 566 return new It2MeHost(std::move(context), std::move(policy_watcher), | 
| 565 It2MeConfirmationDialog::Create(), observer, | 567 It2MeConfirmationDialog::Create(), observer, | 
| 566 std::move(signal_strategy), username, directory_bot_jid); | 568 std::move(signal_strategy), username, directory_bot_jid); | 
| 567 } | 569 } | 
| 568 | 570 | 
| 569 } // namespace remoting | 571 } // namespace remoting | 
| OLD | NEW |