| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #include "ios/chrome/browser/ui/history/history_collection_view_controller.h" | 5 #include "ios/chrome/browser/ui/history/history_collection_view_controller.h" |
| 6 | 6 |
| 7 #import <MobileCoreServices/MobileCoreServices.h> | 7 #import <MobileCoreServices/MobileCoreServices.h> |
| 8 | 8 |
| 9 #include <memory> | 9 #include <memory> |
| 10 | 10 |
| (...skipping 618 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 629 [self.entryInserter removeSection:section]; | 629 [self.entryInserter removeSection:section]; |
| 630 } | 630 } |
| 631 } | 631 } |
| 632 } | 632 } |
| 633 completion:^(BOOL) { | 633 completion:^(BOOL) { |
| 634 // If only the header section remains, there are no history entries. | 634 // If only the header section remains, there are no history entries. |
| 635 if ([self.collectionViewModel numberOfSections] == 1) { | 635 if ([self.collectionViewModel numberOfSections] == 1) { |
| 636 self.entriesType = NO_ENTRIES; | 636 self.entriesType = NO_ENTRIES; |
| 637 } | 637 } |
| 638 [self updateEntriesStatusMessage]; | 638 [self updateEntriesStatusMessage]; |
| 639 [self.delegate historyCollectionViewControllerDidChangeEntries:self]; |
| 639 }]; | 640 }]; |
| 640 } | 641 } |
| 641 | 642 |
| 642 - (void)filterForHistoryEntries:(NSArray*)entries { | 643 - (void)filterForHistoryEntries:(NSArray*)entries { |
| 643 self.collectionView.allowsMultipleSelection = YES; | 644 self.collectionView.allowsMultipleSelection = YES; |
| 644 for (int section = 1; section < [self.collectionViewModel numberOfSections]; | 645 for (int section = 1; section < [self.collectionViewModel numberOfSections]; |
| 645 ++section) { | 646 ++section) { |
| 646 NSInteger sectionIdentifier = | 647 NSInteger sectionIdentifier = |
| 647 [self.collectionViewModel sectionIdentifierForSection:section]; | 648 [self.collectionViewModel sectionIdentifierForSection:section]; |
| 648 if ([self.collectionViewModel | 649 if ([self.collectionViewModel |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 798 [self.URLLoader webPageOrderedOpen:copiedURL | 799 [self.URLLoader webPageOrderedOpen:copiedURL |
| 799 referrer:web::Referrer() | 800 referrer:web::Referrer() |
| 800 windowName:nil | 801 windowName:nil |
| 801 inIncognito:YES | 802 inIncognito:YES |
| 802 inBackground:NO | 803 inBackground:NO |
| 803 appendTo:kLastTab]; | 804 appendTo:kLastTab]; |
| 804 }]; | 805 }]; |
| 805 } | 806 } |
| 806 | 807 |
| 807 @end | 808 @end |
| OLD | NEW |