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

Unified Diff: ios/chrome/browser/ui/history/history_panel_view_controller.mm

Issue 2624963003: [ObjC ARC] Converts ios/chrome/browser/ui/history:history to ARC. (Closed)
Patch Set: Reparent and fix tests Created 3 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: 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)

Powered by Google App Engine
This is Rietveld 408576698