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 622 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
633 alertControllerWithTitle:nil | 633 alertControllerWithTitle:nil |
634 message:nil | 634 message:nil |
635 preferredStyle:UIAlertControllerStyleActionSheet]; | 635 preferredStyle:UIAlertControllerStyleActionSheet]; |
636 | 636 |
637 UIAlertAction* clearDataAction = [UIAlertAction | 637 UIAlertAction* clearDataAction = [UIAlertAction |
638 actionWithTitle:l10n_util::GetNSString(IDS_IOS_CLEAR_BUTTON) | 638 actionWithTitle:l10n_util::GetNSString(IDS_IOS_CLEAR_BUTTON) |
639 style:UIAlertActionStyleDestructive | 639 style:UIAlertActionStyleDestructive |
640 handler:^(UIAlertAction* action) { | 640 handler:^(UIAlertAction* action) { |
641 [weakSelf clearDataForDataTypes:dataTypeMaskToRemove]; | 641 [weakSelf clearDataForDataTypes:dataTypeMaskToRemove]; |
642 }]; | 642 }]; |
| 643 clearDataAction.accessibilityLabel = |
| 644 l10n_util::GetNSString(IDS_IOS_CONFIRM_CLEAR_BUTTON); |
643 UIAlertAction* cancelAction = | 645 UIAlertAction* cancelAction = |
644 [UIAlertAction actionWithTitle:l10n_util::GetNSString(IDS_CANCEL) | 646 [UIAlertAction actionWithTitle:l10n_util::GetNSString(IDS_CANCEL) |
645 style:UIAlertActionStyleCancel | 647 style:UIAlertActionStyleCancel |
646 handler:nil]; | 648 handler:nil]; |
647 [alertController addAction:clearDataAction]; | 649 [alertController addAction:clearDataAction]; |
648 [alertController addAction:cancelAction]; | 650 [alertController addAction:cancelAction]; |
649 [self presentViewController:alertController animated:YES completion:nil]; | 651 [self presentViewController:alertController animated:YES completion:nil]; |
650 return YES; | 652 return YES; |
651 } | 653 } |
652 | 654 |
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
893 | 895 |
894 #pragma mark TimeRangeSelectorCollectionViewControllerDelegate | 896 #pragma mark TimeRangeSelectorCollectionViewControllerDelegate |
895 | 897 |
896 - (void)timeRangeSelectorViewController: | 898 - (void)timeRangeSelectorViewController: |
897 (TimeRangeSelectorCollectionViewController*)collectionViewController | 899 (TimeRangeSelectorCollectionViewController*)collectionViewController |
898 didSelectTimePeriod:(browsing_data::TimePeriod)timePeriod { | 900 didSelectTimePeriod:(browsing_data::TimePeriod)timePeriod { |
899 _timePeriod = timePeriod; | 901 _timePeriod = timePeriod; |
900 } | 902 } |
901 | 903 |
902 @end | 904 @end |
OLD | NEW |