Commit 6273712b authored by gambard's avatar gambard Committed by Commit bot

Follow up from ARC conversion

Addressing the comments raised in https://codereview.chromium.org/2808873002/

BUG=none

Review-Url: https://codereview.chromium.org/2851713002
Cr-Commit-Position: refs/heads/master@{#467951}
parent 1ef06828
......@@ -35,6 +35,10 @@
#import "ios/shared/chrome/browser/ui/tools_menu/tools_menu_configuration.h"
#import "ios/third_party/material_roboto_font_loader_ios/src/src/MaterialRobotoFontLoader.h"
#if !defined(__has_feature) || !__has_feature(objc_arc)
#error "This file requires ARC support."
#endif
using base::UserMetricsAction;
using ios::material::TimingFunction;
......@@ -76,10 +80,6 @@ NSString* const kToolbarShareButtonIdentifier =
// Makes a two-element C array of CGRects as described above, one for each
// device idiom.
#define FRAME_PAIR(H) { IPHONE_FRAME(H), IPAD_FRAME(H) }
#if !defined(__has_feature) || !__has_feature(objc_arc)
#error "This file requires ARC support."
#endif
// clang-format on
const CGRect kToolbarFrame[INTERFACE_IDIOM_COUNT] = FRAME_PAIR(56);
......
......@@ -849,7 +849,7 @@ CGRect RectShiftedDownAndResizedForStatusBar(CGRect rect) {
- (void)dismissTabHistoryPopup {
if (!_tabHistoryPopupController)
return;
TabHistoryPopupController* tempTHPC = _tabHistoryPopupController;
__block TabHistoryPopupController* tempTHPC = _tabHistoryPopupController;
[tempTHPC containerView].userInteractionEnabled = NO;
[tempTHPC dismissAnimatedWithCompletion:^{
// Unpress the back/forward button by restoring the normal and
......@@ -857,7 +857,7 @@ CGRect RectShiftedDownAndResizedForStatusBar(CGRect rect) {
[self setImagesForNavButton:_backButton withTabHistoryVisible:NO];
[self setImagesForNavButton:_forwardButton withTabHistoryVisible:NO];
// Reference tempTHPC so the block retains it.
[tempTHPC self];
tempTHPC = nil;
}];
// reset _tabHistoryPopupController to prevent -applicationDidEnterBackground
// from posting another kTabHistoryPopupWillHideNotification.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment