| 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/save_passwords_collection_view_controlle
r.h" | 5 #import "ios/chrome/browser/ui/settings/save_passwords_collection_view_controlle
r.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/ios/ios_util.h" | 10 #include "base/ios/ios_util.h" |
| (...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 388 | 388 |
| 389 #pragma mark - BooleanObserver | 389 #pragma mark - BooleanObserver |
| 390 | 390 |
| 391 - (void)booleanDidChange:(id<ObservableBoolean>)observableBoolean { | 391 - (void)booleanDidChange:(id<ObservableBoolean>)observableBoolean { |
| 392 DCHECK_EQ(observableBoolean, passwordManagerEnabled_.get()); | 392 DCHECK_EQ(observableBoolean, passwordManagerEnabled_.get()); |
| 393 | 393 |
| 394 // Update the item. | 394 // Update the item. |
| 395 savePasswordsItem_.get().on = [passwordManagerEnabled_ value]; | 395 savePasswordsItem_.get().on = [passwordManagerEnabled_ value]; |
| 396 | 396 |
| 397 // Update the cell. | 397 // Update the cell. |
| 398 [self reconfigureCellsForItems:@[ savePasswordsItem_ ] | 398 [self reconfigureCellsForItems:@[ savePasswordsItem_ ]]; |
| 399 inSectionWithIdentifier:SectionIdentifierSavePasswordsSwitch]; | |
| 400 | 399 |
| 401 // Update the rest of the UI. | 400 // Update the rest of the UI. |
| 402 [self.editor setEditing:NO]; | 401 [self.editor setEditing:NO]; |
| 403 [self updateEditButton]; | 402 [self updateEditButton]; |
| 404 [self reloadData]; | 403 [self reloadData]; |
| 405 } | 404 } |
| 406 | 405 |
| 407 #pragma mark - Actions | 406 #pragma mark - Actions |
| 408 | 407 |
| 409 - (void)savePasswordsSwitchChanged:(UISwitch*)switchView { | 408 - (void)savePasswordsSwitchChanged:(UISwitch*)switchView { |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 595 | 594 |
| 596 - (void)updateSuccessfulReauthTime { | 595 - (void)updateSuccessfulReauthTime { |
| 597 successfulReauthTime_.reset([[NSDate alloc] init]); | 596 successfulReauthTime_.reset([[NSDate alloc] init]); |
| 598 } | 597 } |
| 599 | 598 |
| 600 - (NSDate*)lastSuccessfulReauthTime { | 599 - (NSDate*)lastSuccessfulReauthTime { |
| 601 return successfulReauthTime_.get(); | 600 return successfulReauthTime_.get(); |
| 602 } | 601 } |
| 603 | 602 |
| 604 @end | 603 @end |
| OLD | NEW |