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

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

Issue 2342393003: Removing TODO for It2Me Confirmation Dialog (Closed)
Patch Set: Switching Logging statement Created 4 years, 2 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
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 #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 500 matching lines...) Expand 10 before | Expand all | Expand 10 after
511 << ": Domain mismatch."; 511 << ": Domain mismatch.";
512 result_callback.Run(ValidationResult::ERROR_INVALID_ACCOUNT); 512 result_callback.Run(ValidationResult::ERROR_INVALID_ACCOUNT);
513 return; 513 return;
514 } 514 }
515 } 515 }
516 516
517 // Show a confirmation dialog to the user to allow them to confirm/reject it. 517 // Show a confirmation dialog to the user to allow them to confirm/reject it.
518 std::unique_ptr<It2MeConfirmationDialog> confirmation_dialog = 518 std::unique_ptr<It2MeConfirmationDialog> confirmation_dialog =
519 confirmation_dialog_factory_->Create(); 519 confirmation_dialog_factory_->Create();
520 520
521 // TODO(joedow): Remove this once confirmation dialog exists on all platforms.
522 if (!confirmation_dialog) {
523 result_callback.Run(ValidationResult::SUCCESS);
524 return;
525 }
526
527 confirmation_dialog_proxy_.reset(new It2MeConfirmationDialogProxy( 521 confirmation_dialog_proxy_.reset(new It2MeConfirmationDialogProxy(
528 host_context_->ui_task_runner(), std::move(confirmation_dialog))); 522 host_context_->ui_task_runner(), std::move(confirmation_dialog)));
529 523
530 confirmation_dialog_proxy_->Show( 524 confirmation_dialog_proxy_->Show(
531 client_username, base::Bind(&It2MeHost::OnConfirmationResult, 525 client_username, base::Bind(&It2MeHost::OnConfirmationResult,
532 base::Unretained(this), result_callback)); 526 base::Unretained(this), result_callback));
533 } 527 }
534 528
535 void It2MeHost::OnConfirmationResult( 529 void It2MeHost::OnConfirmationResult(
536 const protocol::ValidatingAuthenticator::ResultCallback& result_callback, 530 const protocol::ValidatingAuthenticator::ResultCallback& result_callback,
(...skipping 24 matching lines...) Expand all
561 std::unique_ptr<It2MeConfirmationDialogFactory> confirmation_dialog_factory( 555 std::unique_ptr<It2MeConfirmationDialogFactory> confirmation_dialog_factory(
562 new It2MeConfirmationDialogFactory()); 556 new It2MeConfirmationDialogFactory());
563 std::unique_ptr<PolicyWatcher> policy_watcher = 557 std::unique_ptr<PolicyWatcher> policy_watcher =
564 PolicyWatcher::Create(policy_service, context->file_task_runner()); 558 PolicyWatcher::Create(policy_service, context->file_task_runner());
565 return new It2MeHost(std::move(context), std::move(policy_watcher), 559 return new It2MeHost(std::move(context), std::move(policy_watcher),
566 std::move(confirmation_dialog_factory), observer, 560 std::move(confirmation_dialog_factory), observer,
567 xmpp_server_config, directory_bot_jid); 561 xmpp_server_config, directory_bot_jid);
568 } 562 }
569 563
570 } // namespace remoting 564 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/it2me/it2me_confirmation_dialog_android.cc ('k') | remoting/host/it2me/it2me_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698