Index: ios/chrome/browser/ui/history/history_panel_view_controller.mm |
diff --git a/ios/chrome/browser/ui/history/history_panel_view_controller.mm b/ios/chrome/browser/ui/history/history_panel_view_controller.mm |
index 70fb0a6c71e5232cc9b94b55fc8828bb4990d832..8a12bdb440f2f032ec841e79af0e13ad804e9bc8 100644 |
--- a/ios/chrome/browser/ui/history/history_panel_view_controller.mm |
+++ b/ios/chrome/browser/ui/history/history_panel_view_controller.mm |
@@ -26,6 +26,10 @@ |
#import "ios/third_party/material_components_ios/src/components/NavigationBar/src/MaterialNavigationBar.h" |
#include "ui/base/l10n/l10n_util_mac.h" |
+#if !defined(__has_feature) || !__has_feature(objc_arc) |
+#error "This file requires ARC support." |
+#endif |
+ |
namespace { |
// Shadow opacity for the clear browsing button and the header when scrolling. |
CGFloat kShadowOpacity = 0.2f; |
@@ -114,9 +118,8 @@ CGFloat kShadowOpacity = 0.2f; |
(ios::ChromeBrowserState*)browserState |
loader:(id<UrlLoader>)loader { |
HistoryPanelViewController* historyPanelController = |
- [[[HistoryPanelViewController alloc] initWithLoader:loader |
- browserState:browserState] |
- autorelease]; |
+ [[HistoryPanelViewController alloc] initWithLoader:loader |
+ browserState:browserState]; |
return historyPanelController; |
} |
@@ -153,10 +156,10 @@ CGFloat kShadowOpacity = 0.2f; |
[_appBar addSubviewsToParent]; |
// Add navigation bar buttons. |
- _leftBarButtonItem.reset([[ChromeIcon |
+ _leftBarButtonItem.reset([ChromeIcon |
templateBarButtonItemWithImage:[ChromeIcon searchIcon] |
target:self |
- action:@selector(enterSearchMode)] retain]); |
+ action:@selector(enterSearchMode)]); |
self.navigationItem.leftBarButtonItem = _leftBarButtonItem; |
_rightBarButtonItem.reset([[UIBarButtonItem alloc] |
initWithTitle:l10n_util::GetNSString(IDS_IOS_NAVIGATION_BAR_DONE_BUTTON) |