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

Unified Diff: chrome/browser/ui/views/infobars/infobar_view.cc

Issue 1865213004: Convert //chrome/browser/ui from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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: chrome/browser/ui/views/infobars/infobar_view.cc
diff --git a/chrome/browser/ui/views/infobars/infobar_view.cc b/chrome/browser/ui/views/infobars/infobar_view.cc
index d0b78c305e05fee44ef0e14e78280c42632edc7a..ae8637ffdbf6cc418150aea38205187c39a987ba 100644
--- a/chrome/browser/ui/views/infobars/infobar_view.cc
+++ b/chrome/browser/ui/views/infobars/infobar_view.cc
@@ -5,9 +5,10 @@
#include "chrome/browser/ui/views/infobars/infobar_view.h"
#include <algorithm>
+#include <memory>
#include <utility>
-#include "base/memory/scoped_ptr.h"
+#include "base/memory/ptr_util.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/ui/infobar_container_delegate.h"
#include "chrome/browser/ui/views/bar_control_button.h"
@@ -76,7 +77,7 @@ SkColor GetInfobarTextColor() {
const int InfoBarView::kButtonButtonSpacing = views::kRelatedButtonHSpacing;
const int InfoBarView::kEndOfLabelSpacing = views::kItemLabelSpacing;
-InfoBarView::InfoBarView(scoped_ptr<infobars::InfoBarDelegate> delegate)
+InfoBarView::InfoBarView(std::unique_ptr<infobars::InfoBarDelegate> delegate)
: infobars::InfoBar(std::move(delegate)),
views::ExternalFocusTracker(this, nullptr),
child_container_(new views::View()),
@@ -85,7 +86,7 @@ InfoBarView::InfoBarView(scoped_ptr<infobars::InfoBarDelegate> delegate)
set_owned_by_client(); // InfoBar deletes itself at the appropriate time.
set_background(
new InfoBarBackground(infobars::InfoBar::delegate()->GetInfoBarType()));
- SetEventTargeter(make_scoped_ptr(new views::ViewTargeter(this)));
+ SetEventTargeter(base::WrapUnique(new views::ViewTargeter(this)));
AddChildView(child_container_);
@@ -141,7 +142,7 @@ views::LabelButton* InfoBarView::CreateTextButton(
const base::string16& text) {
DCHECK(!ui::MaterialDesignController::IsModeMaterial());
views::LabelButton* button = new views::LabelButton(listener, text);
- scoped_ptr<views::LabelButtonAssetBorder> button_border(
+ std::unique_ptr<views::LabelButtonAssetBorder> button_border(
new views::LabelButtonAssetBorder(views::Button::STYLE_TEXTBUTTON));
const int kNormalImageSet[] = IMAGE_GRID(IDR_INFOBARBUTTON_NORMAL);
button_border->SetPainter(
« no previous file with comments | « chrome/browser/ui/views/infobars/infobar_view.h ('k') | chrome/browser/ui/views/infobars/legacy_infobars_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698