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

Unified Diff: ash/system/session_length_limit/tray_session_length_limit.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
Index: ash/system/session_length_limit/tray_session_length_limit.cc
diff --git a/ash/system/session_length_limit/tray_session_length_limit.cc b/ash/system/session_length_limit/tray_session_length_limit.cc
index 395d91130bf4aef1a8a4dd44481a53c8ed72e8e3..490b7431ef81df94db157a1fca862f26e98e2330 100644
--- a/ash/system/session_length_limit/tray_session_length_limit.cc
+++ b/ash/system/session_length_limit/tray_session_length_limit.cc
@@ -122,7 +122,7 @@ class RemainingSessionTimeTrayView : public views::View {
void Update();
private:
- void SetBorder(ShelfAlignment shelf_alignment);
+ void SetBorderFromAlignment(ShelfAlignment shelf_alignment);
const TraySessionLengthLimit* owner_;
@@ -156,7 +156,7 @@ RemainingSessionTimeTrayView::~RemainingSessionTimeTrayView() {
void RemainingSessionTimeTrayView::UpdateClockLayout(
ShelfAlignment shelf_alignment) {
- SetBorder(shelf_alignment);
+ SetBorderFromAlignment(shelf_alignment);
const bool horizontal_layout = (shelf_alignment == SHELF_ALIGNMENT_BOTTOM ||
shelf_alignment == SHELF_ALIGNMENT_TOP);
if (horizontal_layout && !horizontal_layout_label_) {
@@ -262,14 +262,17 @@ void RemainingSessionTimeTrayView::Update() {
SetVisible(true);
}
-void RemainingSessionTimeTrayView::SetBorder(ShelfAlignment shelf_alignment) {
+void RemainingSessionTimeTrayView::SetBorderFromAlignment(
+ ShelfAlignment shelf_alignment) {
if (shelf_alignment == SHELF_ALIGNMENT_BOTTOM ||
shelf_alignment == SHELF_ALIGNMENT_TOP) {
- set_border(views::Border::CreateEmptyBorder(
- 0, kTrayLabelItemHorizontalPaddingBottomAlignment,
- 0, kTrayLabelItemHorizontalPaddingBottomAlignment));
+ SetBorder(views::Border::CreateEmptyBorder(
+ 0,
+ kTrayLabelItemHorizontalPaddingBottomAlignment,
+ 0,
+ kTrayLabelItemHorizontalPaddingBottomAlignment));
} else {
- set_border(NULL);
+ SetBorder(views::Border::NullBorder());
}
}
« no previous file with comments | « ash/system/logout_button/logout_confirmation_dialog_view.cc ('k') | ash/system/tray/hover_highlight_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698