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

Unified Diff: remoting/host/it2me/it2me_confirmation_dialog_proxy.cc

Issue 2310303002: Moving It2Me confirmation prompt into the Validation callback flow (Closed)
Patch Set: Addressing CR Feedback Created 4 years, 3 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
Index: remoting/host/it2me/it2me_confirmation_dialog_proxy.cc
diff --git a/remoting/host/it2me/it2me_confirmation_dialog_proxy.cc b/remoting/host/it2me/it2me_confirmation_dialog_proxy.cc
index 2c90dba11329f955193c108b8333885aae746b75..82a542ca62c893e160b6c0a77dfc0b97976dfb91 100644
--- a/remoting/host/it2me/it2me_confirmation_dialog_proxy.cc
+++ b/remoting/host/it2me/it2me_confirmation_dialog_proxy.cc
@@ -23,7 +23,7 @@ class It2MeConfirmationDialogProxy::Core {
~Core();
// Shows the wrapped dialog. Must be called on the UI thread.
- void Show();
+ void Show(const std::string& remote_user_email);
scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner() {
return ui_task_runner_;
@@ -59,10 +59,12 @@ It2MeConfirmationDialogProxy::Core::~Core() {
DCHECK(ui_task_runner_->BelongsToCurrentThread());
}
-void It2MeConfirmationDialogProxy::Core::Show() {
+void It2MeConfirmationDialogProxy::Core::Show(
+ const std::string& remote_user_email) {
DCHECK(ui_task_runner_->BelongsToCurrentThread());
- dialog_->Show(base::Bind(&It2MeConfirmationDialogProxy::Core::ReportResult,
+ dialog_->Show(remote_user_email,
+ base::Bind(&It2MeConfirmationDialogProxy::Core::ReportResult,
base::Unretained(this)));
}
@@ -90,13 +92,14 @@ It2MeConfirmationDialogProxy::~It2MeConfirmationDialogProxy() {
}
void It2MeConfirmationDialogProxy::Show(
+ const std::string& remote_user_email,
const It2MeConfirmationDialog::ResultCallback& callback) {
DCHECK(core_->caller_task_runner()->BelongsToCurrentThread());
callback_ = callback;
- core_->ui_task_runner()->PostTask(FROM_HERE,
- base::Bind(&Core::Show,
- base::Unretained(core_.get())));
+ core_->ui_task_runner()->PostTask(
+ FROM_HERE, base::Bind(&Core::Show, base::Unretained(core_.get()),
+ remote_user_email));
}
void It2MeConfirmationDialogProxy::ReportResult(
« no previous file with comments | « remoting/host/it2me/it2me_confirmation_dialog_proxy.h ('k') | remoting/host/it2me/it2me_confirmation_dialog_proxy_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698