| 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/accounts_collection_view_controller.h" | 5 #import "ios/chrome/browser/ui/settings/accounts_collection_view_controller.h" |
| 6 | 6 |
| 7 #import "base/mac/foundation_util.h" | 7 #import "base/mac/foundation_util.h" |
| 8 #include "base/metrics/user_metrics.h" | 8 #include "base/metrics/user_metrics.h" |
| 9 #include "base/strings/sys_string_conversions.h" | 9 #include "base/strings/sys_string_conversions.h" |
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| (...skipping 628 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 639 [self chromeExecuteCommand:command]; | 639 [self chromeExecuteCommand:command]; |
| 640 } | 640 } |
| 641 | 641 |
| 642 #pragma mark - ChromeIdentityServiceObserver | 642 #pragma mark - ChromeIdentityServiceObserver |
| 643 | 643 |
| 644 - (void)onProfileUpdate:(ChromeIdentity*)identity { | 644 - (void)onProfileUpdate:(ChromeIdentity*)identity { |
| 645 CollectionViewAccountItem* item = | 645 CollectionViewAccountItem* item = |
| 646 base::mac::ObjCCastStrict<CollectionViewAccountItem>( | 646 base::mac::ObjCCastStrict<CollectionViewAccountItem>( |
| 647 [_identityMap objectForKey:identity.gaiaID]); | 647 [_identityMap objectForKey:identity.gaiaID]); |
| 648 [self updateAccountItem:item withIdentity:identity]; | 648 [self updateAccountItem:item withIdentity:identity]; |
| 649 NSIndexPath* indexPath = | 649 NSIndexPath* indexPath = [self.collectionViewModel indexPathForItem:item]; |
| 650 [self.collectionViewModel indexPathForItem:item | |
| 651 inSectionWithIdentifier:SectionIdentifierAccounts]; | |
| 652 [self.collectionView reloadItemsAtIndexPaths:@[ indexPath ]]; | 650 [self.collectionView reloadItemsAtIndexPaths:@[ indexPath ]]; |
| 653 } | 651 } |
| 654 | 652 |
| 655 - (void)onChromeIdentityServiceWillBeDestroyed { | 653 - (void)onChromeIdentityServiceWillBeDestroyed { |
| 656 _identityServiceObserver.reset(); | 654 _identityServiceObserver.reset(); |
| 657 } | 655 } |
| 658 | 656 |
| 659 @end | 657 @end |
| OLD | NEW |