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/import_data_collection_view_controller.h
" | 5 #import "ios/chrome/browser/ui/settings/import_data_collection_view_controller.h
" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #import "base/mac/foundation_util.h" | 8 #import "base/mac/foundation_util.h" |
9 #include "base/strings/sys_string_conversions.h" | 9 #include "base/strings/sys_string_conversions.h" |
10 #import "ios/chrome/browser/ui/collection_view/cells/MDCCollectionViewCell+Chrom
e.h" | 10 #import "ios/chrome/browser/ui/collection_view/cells/MDCCollectionViewCell+Chrom
e.h" |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 | 190 |
191 // Updates the UI based on the value of |_shouldClearData|. | 191 // Updates the UI based on the value of |_shouldClearData|. |
192 - (void)updateUI { | 192 - (void)updateUI { |
193 BOOL importDataSelected = _shouldClearData == SHOULD_CLEAR_DATA_MERGE_DATA; | 193 BOOL importDataSelected = _shouldClearData == SHOULD_CLEAR_DATA_MERGE_DATA; |
194 _importDataItem.accessoryType = importDataSelected | 194 _importDataItem.accessoryType = importDataSelected |
195 ? MDCCollectionViewCellAccessoryCheckmark | 195 ? MDCCollectionViewCellAccessoryCheckmark |
196 : MDCCollectionViewCellAccessoryNone; | 196 : MDCCollectionViewCellAccessoryNone; |
197 _keepDataSeparateItem.accessoryType = | 197 _keepDataSeparateItem.accessoryType = |
198 importDataSelected ? MDCCollectionViewCellAccessoryNone | 198 importDataSelected ? MDCCollectionViewCellAccessoryNone |
199 : MDCCollectionViewCellAccessoryCheckmark; | 199 : MDCCollectionViewCellAccessoryCheckmark; |
200 [self reconfigureCellsForItems:@[ _importDataItem, _keepDataSeparateItem ] | 200 [self reconfigureCellsForItems:@[ _importDataItem, _keepDataSeparateItem ]]; |
201 inSectionWithIdentifier:SectionIdentifierOptions]; | |
202 } | 201 } |
203 | 202 |
204 - (void)didTapContinue { | 203 - (void)didTapContinue { |
205 [_delegate didChooseClearDataPolicy:self shouldClearData:_shouldClearData]; | 204 [_delegate didChooseClearDataPolicy:self shouldClearData:_shouldClearData]; |
206 } | 205 } |
207 | 206 |
208 @end | 207 @end |
OLD | NEW |