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

Unified Diff: chrome/browser/ui/views/toolbar/back_button.cc

Issue 145033006: views: Make View::set_border() take a scoped_ptr<>. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase to ToT Created 6 years, 11 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
« no previous file with comments | « chrome/browser/ui/views/tabs/tab.cc ('k') | chrome/browser/ui/views/toolbar/browser_action_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/toolbar/back_button.cc
diff --git a/chrome/browser/ui/views/toolbar/back_button.cc b/chrome/browser/ui/views/toolbar/back_button.cc
index 05e3bc8545d677bfb1a39a97eba4e0c7c2a2943b..8ba47fd5907e88df4ea67898f5c06df8e44335d9 100644
--- a/chrome/browser/ui/views/toolbar/back_button.cc
+++ b/chrome/browser/ui/views/toolbar/back_button.cc
@@ -27,11 +27,12 @@ void BackButton::SetLeadingMargin(int margin) {
// Adjust border insets to follow the margin change,
// which will be reflected in where the border is painted
// through |GetThemePaintRect|.
- views::LabelButtonBorder* border = new views::LabelButtonBorder(style());
+ scoped_ptr<views::LabelButtonBorder> border(
+ new views::LabelButtonBorder(style()));
const gfx::Insets insets(border->GetInsets());
border->set_insets(gfx::Insets(insets.top(), insets.left() + margin,
insets.bottom(), insets.right()));
- UpdateThemedBorder(border);
+ UpdateThemedBorder(border.PassAs<views::Border>());
// Similarly fiddle the focus border. Value consistent with LabelButton
// and TextButton.
« no previous file with comments | « chrome/browser/ui/views/tabs/tab.cc ('k') | chrome/browser/ui/views/toolbar/browser_action_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698