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

Unified Diff: ui/message_center/views/notification_control_buttons_view.h

Issue 2967133002: Fix memory leak in NotificationControlButtonsView (Closed)
Patch Set: Created 3 years, 5 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 | « no previous file | ui/message_center/views/notification_control_buttons_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/message_center/views/notification_control_buttons_view.h
diff --git a/ui/message_center/views/notification_control_buttons_view.h b/ui/message_center/views/notification_control_buttons_view.h
index ee9faab679b7069c19a66d1a18654f5db881bf89..2dcf1d20d5e5cbb1c99afa74ea9db2faa9859b81 100644
--- a/ui/message_center/views/notification_control_buttons_view.h
+++ b/ui/message_center/views/notification_control_buttons_view.h
@@ -51,12 +51,9 @@ class MESSAGE_CENTER_EXPORT NotificationControlButtonsView
// close button, false otherwise.
bool IsSettingsButtonFocused() const;
- message_center::PaddedButton* close_button_for_testing() const {
- return close_button_;
- }
- message_center::PaddedButton* settings_button_for_testing() const {
- return settings_button_;
- }
+ // Methods for testing.
+ message_center::PaddedButton* close_button_for_testing() const;
+ message_center::PaddedButton* settings_button_for_testing() const;
// views::View
const char* GetClassName() const override;
@@ -72,8 +69,8 @@ class MESSAGE_CENTER_EXPORT NotificationControlButtonsView
private:
MessageView* message_view_;
- message_center::PaddedButton* close_button_ = nullptr;
- message_center::PaddedButton* settings_button_ = nullptr;
+ std::unique_ptr<message_center::PaddedButton> close_button_;
+ std::unique_ptr<message_center::PaddedButton> settings_button_;
std::unique_ptr<gfx::LinearAnimation> bgcolor_animation_;
SkColor bgcolor_origin_;
« no previous file with comments | « no previous file | ui/message_center/views/notification_control_buttons_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698