| Index: remoting/host/it2me/it2me_confirmation_dialog_chromeos.cc
|
| diff --git a/remoting/host/it2me/it2me_confirmation_dialog_chromeos.cc b/remoting/host/it2me/it2me_confirmation_dialog_chromeos.cc
|
| index eecdc2ffd4344ee6fe527114e28639d82005444b..0185fdd6cef09e2b227759ec5dd762d7edbd9451 100644
|
| --- a/remoting/host/it2me/it2me_confirmation_dialog_chromeos.cc
|
| +++ b/remoting/host/it2me/it2me_confirmation_dialog_chromeos.cc
|
| @@ -2,13 +2,15 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| +#include <memory>
|
| +#include <string>
|
| +
|
| #include "base/bind.h"
|
| +#include "base/callback.h"
|
| #include "base/callback_helpers.h"
|
| -#include "base/location.h"
|
| +#include "base/i18n/message_formatter.h"
|
| #include "base/macros.h"
|
| -#include "base/memory/weak_ptr.h"
|
| -#include "base/single_thread_task_runner.h"
|
| -#include "base/threading/thread_task_runner_handle.h"
|
| +#include "base/strings/utf_string_conversions.h"
|
| #include "remoting/base/string_resources.h"
|
| #include "remoting/host/chromeos/message_box.h"
|
| #include "remoting/host/it2me/it2me_confirmation_dialog.h"
|
| @@ -22,7 +24,8 @@ class It2MeConfirmationDialogChromeOS : public It2MeConfirmationDialog {
|
| ~It2MeConfirmationDialogChromeOS() override;
|
|
|
| // It2MeConfirmationDialog implementation.
|
| - void Show(const ResultCallback& callback) override;
|
| + void Show(const std::string& remote_user_email,
|
| + const ResultCallback& callback) override;
|
|
|
| private:
|
| // Handles result from |message_box_|.
|
| @@ -38,12 +41,17 @@ It2MeConfirmationDialogChromeOS::It2MeConfirmationDialogChromeOS() {}
|
|
|
| It2MeConfirmationDialogChromeOS::~It2MeConfirmationDialogChromeOS() {}
|
|
|
| -void It2MeConfirmationDialogChromeOS::Show(const ResultCallback& callback) {
|
| +void It2MeConfirmationDialogChromeOS::Show(const std::string& remote_user_email,
|
| + const ResultCallback& callback) {
|
| + DCHECK(!remote_user_email.empty());
|
| callback_ = callback;
|
|
|
| message_box_.reset(new MessageBox(
|
| l10n_util::GetStringUTF16(IDS_MODE_IT2ME),
|
| - l10n_util::GetStringUTF16(IDS_SHARE_CONFIRM_DIALOG_MESSAGE),
|
| + base::i18n::MessageFormatter::FormatWithNumberedArgs(
|
| + l10n_util::GetStringUTF16(
|
| + IDS_SHARE_CONFIRM_DIALOG_MESSAGE_WITH_USERNAME),
|
| + base::UTF8ToUTF16(remote_user_email)),
|
| l10n_util::GetStringUTF16(IDS_SHARE_CONFIRM_DIALOG_CONFIRM),
|
| l10n_util::GetStringUTF16(IDS_SHARE_CONFIRM_DIALOG_DECLINE),
|
| base::Bind(&It2MeConfirmationDialogChromeOS::OnMessageBoxResult,
|
|
|