|
|
Replace the virtual InfoBarDelegate::InfoBarClosed() function with a non-virtual one. This is a step along the way to killing it entirely. This also adds a lot of OVERRIDE markers and does some other cleanup in a few places.
The original (stupid) design for the delegate class left subclasses great flexibility in how they mapped infobars to delegates. In practice, no one ever wanted multiple infobars driven off a single delegate, so the mapping was always one-to-one. As a result, it was always correct for InfoBarClosed() to "delete this", but because the base class did not do so, every subclass needed to. Most did; the others leaked memory and failed to run their destructors.
This change forces the base class to delete itself. This fixes the delegate leaks in the couple subclasses that failed to do this. It also eliminates a lot of copy-and-pasted "delete this" implementations.
Ultimately, we'll be moving to a model where the InfoBar "view" class owns the delegate and deletes it directly, which will eliminate InfoBarClosed() completely.
BUG= 62154
TEST=none
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=84195
Total comments: 6
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+485 lines, -544 lines) |
Patch |
 |
M |
chrome/browser/alternate_nav_url_fetcher.h
|
View
|
1
2
3
4
5
|
2 chunks |
+7 lines, -8 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/alternate_nav_url_fetcher.cc
|
View
|
1
2
3
4
5
|
1 chunk |
+0 lines, -4 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/autofill/autofill_cc_infobar_delegate.h
|
View
|
1
2
3
4
5
|
1 chunk |
+10 lines, -11 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/autofill/autofill_cc_infobar_delegate.cc
|
View
|
1
2
3
4
5
|
2 chunks |
+2 lines, -7 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/custom_handlers/register_protocol_handler_infobar_delegate.h
|
View
|
1
2
3
4
5
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
 |
M |
chrome/browser/custom_handlers/register_protocol_handler_infobar_delegate.cc
|
View
|
1
2
3
4
5
|
1 chunk |
+0 lines, -4 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/download/download_request_infobar_delegate.h
|
View
|
1
2
3
4
5
|
1 chunk |
+4 lines, -5 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/download/download_request_infobar_delegate.cc
|
View
|
1
2
3
4
5
|
1 chunk |
+0 lines, -4 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/extensions/extension_disabled_infobar_delegate.cc
|
View
|
1
2
3
4
5
|
2 chunks |
+5 lines, -10 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/extensions/extension_infobar_delegate.h
|
View
|
1
2
3
4
5
|
1 chunk |
+6 lines, -7 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/extensions/extension_infobar_delegate.cc
|
View
|
1
2
3
4
5
|
1 chunk |
+0 lines, -4 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/extensions/theme_installed_infobar_delegate.h
|
View
|
1
2
3
4
5
|
1 chunk |
+7 lines, -7 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/extensions/theme_installed_infobar_delegate.cc
|
View
|
1
2
3
4
5
|
1 chunk |
+0 lines, -4 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/geolocation/geolocation_permission_context.cc
|
View
|
1
2
3
4
5
|
2 chunks |
+8 lines, -13 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/google/google_url_tracker.h
|
View
|
1
2
3
4
5
|
2 chunks |
+4 lines, -5 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/google/google_url_tracker.cc
|
View
|
1
2
3
4
5
|
1 chunk |
+1 line, -5 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/notifications/desktop_notification_service.cc
|
View
|
1
2
3
4
5
|
3 chunks |
+6 lines, -12 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/omnibox_search_hint.cc
|
View
|
1
2
3
4
5
|
3 chunks |
+10 lines, -15 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/password_manager_delegate_impl.cc
|
View
|
1
2
3
4
5
|
2 chunks |
+6 lines, -11 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/pdf_unsupported_feature.cc
|
View
|
1
2
3
4
5
|
3 chunks |
+161 lines, -175 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/plugin_installer_infobar_delegate.h
|
View
|
1
2
3
4
5
|
1 chunk |
+9 lines, -8 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/plugin_observer.cc
|
View
|
1
2
3
4
5
|
8 chunks |
+18 lines, -33 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/tab_contents/infobar_delegate.h
|
View
|
1
2
3
4
5
|
2 chunks |
+3 lines, -20 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/tab_contents/infobar_delegate.cc
|
View
|
1
2
3
4
5
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/tab_contents/simple_alert_infobar_delegate.h
|
View
|
1
2
3
4
5
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
 |
M |
chrome/browser/tab_contents/simple_alert_infobar_delegate.cc
|
View
|
1
2
3
4
5
|
1 chunk |
+0 lines, -4 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/tab_contents/tab_contents_ssl_helper.cc
|
View
|
1
2
3
4
5
|
2 chunks |
+6 lines, -12 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/translate/translate_infobar_delegate.h
|
View
|
1
2
3
4
5
|
1 chunk |
+5 lines, -6 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/translate/translate_infobar_delegate.cc
|
View
|
1
2
3
4
5
|
1 chunk |
+0 lines, -4 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/browser_init.cc
|
View
|
1
2
3
4
5
|
7 chunks |
+37 lines, -34 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/cocoa/infobars/infobar_container_controller_unittest.mm
|
View
|
1
2
3
4
5
|
2 chunks |
+24 lines, -13 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/cocoa/infobars/infobar_controller.mm
|
View
|
1
2
3
4
5
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/cocoa/infobars/infobar_controller_unittest.mm
|
View
|
1
2
3
4
5
6
|
2 chunks |
+98 lines, -55 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/cocoa/infobars/mock_confirm_infobar_delegate.h
|
View
|
1
2
3
4
5
|
4 chunks |
+11 lines, -4 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/cocoa/infobars/mock_confirm_infobar_delegate.cc
|
View
|
1
2
3
4
5
|
1 chunk |
+5 lines, -7 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/cocoa/infobars/mock_link_infobar_delegate.h
|
View
|
1
2
3
4
5
|
2 chunks |
+11 lines, -4 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/cocoa/infobars/mock_link_infobar_delegate.cc
|
View
|
1
2
3
4
5
|
1 chunk |
+5 lines, -7 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/cocoa/keystone_infobar.mm
|
View
|
1
2
3
4
5
|
2 chunks |
+6 lines, -11 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/collected_cookies_infobar_delegate.h
|
View
|
1
2
3
4
5
|
1 chunk |
+6 lines, -6 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/collected_cookies_infobar_delegate.cc
|
View
|
1
2
3
4
5
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
Total messages: 6 (0 generated)
|