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

Unified Diff: ios/chrome/browser/ui/settings/time_range_selector_collection_view_controller.mm

Issue 2671743002: Separate state of basic and advanced tab in CBD dialog (Closed)
Patch Set: rebase and fix compilation Created 3 years, 10 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/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 7fc05006fc1c0764131e6508ca0a1343b79e1ffa..10a7895d8c17fa7a71eb4118b4df4302025f9874 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
@@ -37,8 +37,10 @@ const int kStringIDS[] = {
IDS_IOS_CLEAR_BROWSING_DATA_TIME_RANGE_OPTION_LAST_FOUR_WEEKS,
IDS_IOS_CLEAR_BROWSING_DATA_TIME_RANGE_OPTION_BEGINNING_OF_TIME};
-static_assert(arraysize(kStringIDS) == browsing_data::TIME_PERIOD_LAST + 1,
- "Strings have to match the enum values.");
+static_assert(
+ arraysize(kStringIDS) ==
+ static_cast<int>(browsing_data::TimePeriod::TIME_PERIOD_LAST) + 1,
+ "Strings have to match the enum values.");
} // namespace
@@ -150,7 +152,8 @@ initWithPrefs:(PrefService*)prefs
NSInteger itemType =
[self.collectionViewModel itemTypeForIndexPath:indexPath];
int timePeriod = itemType - kItemTypeEnumZero;
- DCHECK_LE(timePeriod, browsing_data::TIME_PERIOD_LAST);
+ DCHECK_LE(timePeriod,
+ static_cast<int>(browsing_data::TimePeriod::TIME_PERIOD_LAST));
[self updatePrefValue:timePeriod];
[_weakDelegate
timeRangeSelectorViewController:self

Powered by Google App Engine
This is Rietveld 408576698