Chromium Code Reviews| Index: components/browsing_data_ui/history_notice_utils.cc |
| diff --git a/components/browsing_data_ui/history_notice_utils.cc b/components/browsing_data_ui/history_notice_utils.cc |
| index 7a6fa132e72adfc1a6ce8f16f677a986d5ce9a28..1785da5e1d582626ec5befcc4853779728861121 100644 |
| --- a/components/browsing_data_ui/history_notice_utils.cc |
| +++ b/components/browsing_data_ui/history_notice_utils.cc |
| @@ -9,14 +9,24 @@ |
| namespace browsing_data_ui { |
| -bool ShouldShowNoticeAboutOtherFormsOfBrowsingHistory( |
| +void ShouldShowNoticeAboutOtherFormsOfBrowsingHistory( |
| const ProfileSyncService* sync_service, |
| - const history::WebHistoryService* history_service) { |
| - return sync_service && |
| - sync_service->IsSyncActive() && |
| - !sync_service->IsUsingSecondaryPassphrase() && |
| - history_service && |
| - history_service->HasOtherFormsOfBrowsingHistory(); |
| + history::WebHistoryService* history_service, |
| + base::Callback<void(bool)> callback) { |
| + // TODO(msramek): The API to query other forms of browsing history is not |
|
sdefresne
2016/03/24 09:50:07
I really dislike this. The function prototype (tak
msramek
2016/03/24 12:53:22
ProfileSyncService* and WebHistoryService* are in
|
| + // fully available yet, so for now, assume they are not present. |
| + callback.Run(false); |
| + return; |
| + |
| + if (!sync_service || |
| + !sync_service->IsSyncActive() || |
| + sync_service->IsUsingSecondaryPassphrase() || |
| + !history_service) { |
| + callback.Run(false); |
| + return; |
| + } |
| + |
| + history_service->QueryWebAndAppActivity(callback); |
| } |
| } // namespace browsing_data_ui |