| Index: ios/chrome/browser/ui/settings/time_range_selector_collection_view_controller.mm
|
| diff --git a/ios/chrome/browser/ui/settings/time_range_selector_collection_view_controller.mm b/ios/chrome/browser/ui/settings/time_range_selector_collection_view_controller.mm
|
| index 23bedfa6ef86cee355cf24c0f0b9f44029cadf55..40e2bc5a018b526713f64a7b322e5aa97e565070 100644
|
| --- a/ios/chrome/browser/ui/settings/time_range_selector_collection_view_controller.mm
|
| +++ b/ios/chrome/browser/ui/settings/time_range_selector_collection_view_controller.mm
|
| @@ -4,9 +4,7 @@
|
|
|
| #import "ios/chrome/browser/ui/settings/time_range_selector_collection_view_controller.h"
|
|
|
| -#import "base/ios/weak_nsobject.h"
|
| #import "base/mac/foundation_util.h"
|
| -#import "base/mac/scoped_nsobject.h"
|
| #include "components/browsing_data/core/pref_names.h"
|
| #include "components/prefs/pref_member.h"
|
| #include "components/prefs/pref_service.h"
|
| @@ -16,6 +14,10 @@
|
| #import "ios/third_party/material_components_ios/src/components/CollectionCells/src/MaterialCollectionCells.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 {
|
|
|
| typedef NS_ENUM(NSInteger, SectionIdentifier) {
|
| @@ -47,8 +49,7 @@ static_assert(
|
| @interface TimeRangeSelectorCollectionViewController () {
|
| // Instance of the parent view controller needed in order to set the time
|
| // range for the browsing data deletion.
|
| - base::WeakNSProtocol<id<TimeRangeSelectorCollectionViewControllerDelegate>>
|
| - _weakDelegate;
|
| + __weak id<TimeRangeSelectorCollectionViewControllerDelegate> _weakDelegate;
|
| IntegerPrefMember timeRangePref_;
|
| }
|
|
|
| @@ -68,7 +69,7 @@ initWithPrefs:(PrefService*)prefs
|
| delegate:(id<TimeRangeSelectorCollectionViewControllerDelegate>)delegate {
|
| self = [super initWithStyle:CollectionViewControllerStyleAppBar];
|
| if (self) {
|
| - _weakDelegate.reset(delegate);
|
| + _weakDelegate = delegate;
|
| self.title = l10n_util::GetNSString(
|
| IDS_IOS_CLEAR_BROWSING_DATA_TIME_RANGE_SELECTOR_TITLE);
|
| timeRangePref_.Init(browsing_data::prefs::kDeleteTimePeriod, prefs);
|
| @@ -137,7 +138,7 @@ initWithPrefs:(PrefService*)prefs
|
| - (CollectionViewTextItem*)timeRangeItemWithOption:(ItemType)itemOption
|
| textMessageID:(int)textMessageID {
|
| CollectionViewTextItem* item =
|
| - [[[CollectionViewTextItem alloc] initWithType:itemOption] autorelease];
|
| + [[CollectionViewTextItem alloc] initWithType:itemOption];
|
| [item setText:l10n_util::GetNSString(textMessageID)];
|
| [item setAccessibilityTraits:UIAccessibilityTraitButton];
|
| return item;
|
|
|