Index: ios/chrome/browser/ui/settings/clear_browsing_data_collection_view_controller.mm |
diff --git a/ios/chrome/browser/ui/settings/clear_browsing_data_collection_view_controller.mm b/ios/chrome/browser/ui/settings/clear_browsing_data_collection_view_controller.mm |
index 125e0fdf32bfaeb197913b8145561215ea634eda..33feb18a8d8189391991e5c79f29fb1efd55f625 100644 |
--- a/ios/chrome/browser/ui/settings/clear_browsing_data_collection_view_controller.mm |
+++ b/ios/chrome/browser/ui/settings/clear_browsing_data_collection_view_controller.mm |
@@ -192,12 +192,14 @@ const int kMaxTimesHistoryNoticeShown = 1; |
int prefValue = browserState->GetPrefs()->GetInteger( |
browsing_data::prefs::kDeleteTimePeriod); |
prefValue = MAX(0, prefValue); |
- if (prefValue > browsing_data::TIME_PERIOD_LAST) { |
- prefValue = browsing_data::TIME_PERIOD_LAST; |
+ const int maxValue = |
+ static_cast<int>(browsing_data::TimePeriod::TIME_PERIOD_LAST); |
+ if (prefValue > maxValue) { |
+ prefValue = maxValue; |
} |
_timePeriod = static_cast<browsing_data::TimePeriod>(prefValue); |
} else { |
- _timePeriod = browsing_data::ALL_TIME; |
+ _timePeriod = browsing_data::TimePeriod::ALL_TIME; |
} |
self.title = l10n_util::GetNSString(IDS_IOS_CLEAR_BROWSING_DATA_TITLE); |
@@ -803,7 +805,7 @@ const int kMaxTimesHistoryNoticeShown = 1; |
(~NSByteCountFormatterUseKB); |
formatter.get().countStyle = NSByteCountFormatterCountStyleMemory; |
NSString* formattedSize = [formatter stringFromByteCount:cacheSizeBytes]; |
- return (_timePeriod == browsing_data::ALL_TIME) |
+ return (_timePeriod == browsing_data::TimePeriod::ALL_TIME) |
? formattedSize |
: l10n_util::GetNSStringF( |
IDS_DEL_CACHE_COUNTER_UPPER_ESTIMATE, |