Chromium Code Reviews| 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 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 322 | 322 |
| 323 - (void)historyServiceFacade:(HistoryServiceFacade*)facade | 323 - (void)historyServiceFacade:(HistoryServiceFacade*)facade |
| 324 didReceiveQueryResult:(HistoryServiceFacade::QueryResult)result { | 324 didReceiveQueryResult:(HistoryServiceFacade::QueryResult)result { |
| 325 self.loading = NO; | 325 self.loading = NO; |
| 326 // If history sync is enabled and there hasn't been a response from synced | 326 // If history sync is enabled and there hasn't been a response from synced |
| 327 // history, try fetching again. | 327 // history, try fetching again. |
| 328 SyncSetupService* syncSetupService = | 328 SyncSetupService* syncSetupService = |
| 329 SyncSetupServiceFactory::GetForBrowserState(_browserState); | 329 SyncSetupServiceFactory::GetForBrowserState(_browserState); |
| 330 if (syncSetupService->IsSyncEnabled() && | 330 if (syncSetupService->IsSyncEnabled() && |
| 331 syncSetupService->IsDataTypeEnabled(syncer::HISTORY_DELETE_DIRECTIVES) && | 331 syncSetupService->IsDataTypeEnabled(syncer::HISTORY_DELETE_DIRECTIVES) && |
| 332 !result.sync_returned) { | 332 !result.sync_returned && |
| 333 // TODO(ramyasharma): Remove this check when sync bug is fixed. | |
|
sczs
2017/03/31 15:58:01
Please use format TODO(crbug.com/####): as in http
ramyasharma
2017/04/04 01:44:06
Done.
| |
| 334 // HISTORY_DELETE_DIRECTIVES should be disabled when passphrase is | |
| 335 // enabled. See crbug/679347. | |
| 336 !syncSetupService->IsSecondaryPassphraseEnabled()) { | |
| 333 [self showHistoryMatchingQuery:_currentQuery]; | 337 [self showHistoryMatchingQuery:_currentQuery]; |
| 334 return; | 338 return; |
| 335 } | 339 } |
| 336 | 340 |
| 337 // If there are no results and no URLs have been loaded, report that no | 341 // If there are no results and no URLs have been loaded, report that no |
| 338 // history entries were found. | 342 // history entries were found. |
| 339 if (result.entries.empty() && !self.hasHistoryEntries) { | 343 if (result.entries.empty() && !self.hasHistoryEntries) { |
| 340 DCHECK(self.entriesType == NO_ENTRIES); | 344 DCHECK(self.entriesType == NO_ENTRIES); |
| 341 [self updateEntriesStatusMessage]; | 345 [self updateEntriesStatusMessage]; |
| 342 [self.delegate historyCollectionViewControllerDidChangeEntries:self]; | 346 [self.delegate historyCollectionViewControllerDidChangeEntries:self]; |
| (...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 799 [self.URLLoader webPageOrderedOpen:copiedURL | 803 [self.URLLoader webPageOrderedOpen:copiedURL |
| 800 referrer:web::Referrer() | 804 referrer:web::Referrer() |
| 801 windowName:nil | 805 windowName:nil |
| 802 inIncognito:YES | 806 inIncognito:YES |
| 803 inBackground:NO | 807 inBackground:NO |
| 804 appendTo:kLastTab]; | 808 appendTo:kLastTab]; |
| 805 }]; | 809 }]; |
| 806 } | 810 } |
| 807 | 811 |
| 808 @end | 812 @end |
| OLD | NEW |