| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #import "ios/chrome/browser/ui/settings/clear_browsing_data_collection_view_cont
roller.h" | 5 #import "ios/chrome/browser/ui/settings/clear_browsing_data_collection_view_cont
roller.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/ios/ios_util.h" | 10 #include "base/ios/ios_util.h" |
| (...skipping 795 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 806 formatter.get().countStyle = NSByteCountFormatterCountStyleMemory; | 806 formatter.get().countStyle = NSByteCountFormatterCountStyleMemory; |
| 807 NSString* formattedSize = [formatter stringFromByteCount:cacheSizeBytes]; | 807 NSString* formattedSize = [formatter stringFromByteCount:cacheSizeBytes]; |
| 808 return (_timePeriod == browsing_data::TimePeriod::ALL_TIME) | 808 return (_timePeriod == browsing_data::TimePeriod::ALL_TIME) |
| 809 ? formattedSize | 809 ? formattedSize |
| 810 : l10n_util::GetNSStringF( | 810 : l10n_util::GetNSStringF( |
| 811 IDS_DEL_CACHE_COUNTER_UPPER_ESTIMATE, | 811 IDS_DEL_CACHE_COUNTER_UPPER_ESTIMATE, |
| 812 base::SysNSStringToUTF16(formattedSize)); | 812 base::SysNSStringToUTF16(formattedSize)); |
| 813 } | 813 } |
| 814 return l10n_util::GetNSString(IDS_DEL_CACHE_COUNTER_ALMOST_EMPTY); | 814 return l10n_util::GetNSString(IDS_DEL_CACHE_COUNTER_ALMOST_EMPTY); |
| 815 } | 815 } |
| 816 return base::SysUTF16ToNSString( | 816 return base::SysUTF16ToNSString(browsing_data::GetCounterTextFromResult( |
| 817 browsing_data::GetCounterTextFromResult(&result)); | 817 &result, browsing_data::ClearBrowsingDataTab::ADVANCED)); |
| 818 } | 818 } |
| 819 | 819 |
| 820 #pragma mark MDCCollectionViewStylingDelegate | 820 #pragma mark MDCCollectionViewStylingDelegate |
| 821 | 821 |
| 822 - (BOOL)collectionView:(UICollectionView*)collectionView | 822 - (BOOL)collectionView:(UICollectionView*)collectionView |
| 823 hidesInkViewAtIndexPath:(NSIndexPath*)indexPath { | 823 hidesInkViewAtIndexPath:(NSIndexPath*)indexPath { |
| 824 NSInteger type = [self.collectionViewModel itemTypeForIndexPath:indexPath]; | 824 NSInteger type = [self.collectionViewModel itemTypeForIndexPath:indexPath]; |
| 825 switch (type) { | 825 switch (type) { |
| 826 case ItemTypeFooterSavedSiteData: | 826 case ItemTypeFooterSavedSiteData: |
| 827 case ItemTypeFooterGoogleAccount: | 827 case ItemTypeFooterGoogleAccount: |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 893 | 893 |
| 894 #pragma mark TimeRangeSelectorCollectionViewControllerDelegate | 894 #pragma mark TimeRangeSelectorCollectionViewControllerDelegate |
| 895 | 895 |
| 896 - (void)timeRangeSelectorViewController: | 896 - (void)timeRangeSelectorViewController: |
| 897 (TimeRangeSelectorCollectionViewController*)collectionViewController | 897 (TimeRangeSelectorCollectionViewController*)collectionViewController |
| 898 didSelectTimePeriod:(browsing_data::TimePeriod)timePeriod { | 898 didSelectTimePeriod:(browsing_data::TimePeriod)timePeriod { |
| 899 _timePeriod = timePeriod; | 899 _timePeriod = timePeriod; |
| 900 } | 900 } |
| 901 | 901 |
| 902 @end | 902 @end |
| OLD | NEW |