| Index: ios/chrome/browser/ui/webui/history/browsing_history_handler.cc
|
| diff --git a/ios/chrome/browser/ui/webui/history/browsing_history_handler.cc b/ios/chrome/browser/ui/webui/history/browsing_history_handler.cc
|
| index 9ce0c9b8c8fc0a6a5debc7f794686015ff07a691..ea34137a673e82416bd575cb9a795800956af08f 100644
|
| --- a/ios/chrome/browser/ui/webui/history/browsing_history_handler.cc
|
| +++ b/ios/chrome/browser/ui/webui/history/browsing_history_handler.cc
|
| @@ -132,6 +132,11 @@ void GetDeviceNameAndType(const ProfileSyncService* sync_service,
|
| *type = kDeviceTypeLaptop;
|
| }
|
|
|
| +void RecordMetricsForNoticeAboutOtherFormsOfBrowsingHistory(bool shown) {
|
| + UMA_HISTOGRAM_BOOLEAN("History.ShownHeaderAboutOtherFormsOfBrowsingHistory",
|
| + shown);
|
| +}
|
| +
|
| } // namespace
|
|
|
| BrowsingHistoryHandler::HistoryEntry::HistoryEntry(
|
| @@ -377,6 +382,9 @@ void BrowsingHistoryHandler::QueryHistory(
|
|
|
| // Set this to false until the results actually arrive.
|
| results_info_value_.SetBoolean("hasSyncedResults", false);
|
| + } else {
|
| + // The notice could not have been shown, because there is no web history.
|
| + RecordMetricsForNoticeAboutOtherFormsOfBrowsingHistory(false);
|
| }
|
| }
|
|
|
| @@ -748,6 +756,8 @@ void BrowsingHistoryHandler::WebHistoryQueryComplete(
|
| void BrowsingHistoryHandler::OtherFormsOfBrowsingHistoryQueryComplete(
|
| bool found_other_forms_of_browsing_history) {
|
| has_other_forms_of_browsing_history_ = found_other_forms_of_browsing_history;
|
| + RecordMetricsForNoticeAboutOtherFormsOfBrowsingHistory(
|
| + has_other_forms_of_browsing_history_);
|
| web_ui()->CallJavascriptFunction(
|
| "showNotification", base::FundamentalValue(has_synced_results_),
|
| base::FundamentalValue(has_other_forms_of_browsing_history_));
|
|
|