Commit 8a901618 authored by Allen Bauer's avatar Allen Bauer Committed by Commit Bot

[chromeos, views] Some small std::unique_ptr<T> updates.

Bug: 648382
Change-Id: I40d0ab4977c7f39893606a0104239cb2408956ae
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2079511
Commit-Queue: Allen Bauer <kylixrd@chromium.org>
Reviewed-by: default avatarJames Cook <jamescook@chromium.org>
Cr-Commit-Position: refs/heads/master@{#745269}
parent 74f9bc02
......@@ -93,8 +93,7 @@ PlatformVerificationDialog::PlatformVerificationDialog(
ConsentCallback callback)
: content::WebContentsObserver(web_contents),
domain_(domain),
callback_(std::move(callback)),
learn_more_button_(nullptr) {
callback_(std::move(callback)) {
DialogDelegate::set_button_label(
ui::DIALOG_BUTTON_OK, l10n_util::GetStringUTF16(IDS_PERMISSION_ALLOW));
DialogDelegate::set_button_label(
......@@ -119,11 +118,11 @@ PlatformVerificationDialog::PlatformVerificationDialog(
run_callback, base::Unretained(this), CONSENT_RESPONSE_NONE));
// Explanation string.
views::Label* label = new views::Label(l10n_util::GetStringFUTF16(
auto label = std::make_unique<views::Label>(l10n_util::GetStringFUTF16(
IDS_PLATFORM_VERIFICATION_DIALOG_HEADLINE, domain_));
label->SetMultiLine(true);
label->SetHorizontalAlignment(gfx::ALIGN_LEFT);
AddChildView(label);
AddChildView(std::move(label));
chrome::RecordDialogCreation(chrome::DialogIdentifier::PLATFORM_VERIFICATION);
}
......
......@@ -65,7 +65,7 @@ class PlatformVerificationDialog : public views::DialogDelegateView,
base::string16 domain_;
ConsentCallback callback_;
views::ImageButton* learn_more_button_;
views::ImageButton* learn_more_button_ = nullptr;
DISALLOW_COPY_AND_ASSIGN(PlatformVerificationDialog);
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment