Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(116)

Unified Diff: ios/chrome/browser/ui/webui/history/browsing_history_handler.cc

Issue 1948633002: Add histograms for notices about other forms of browsing history (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Android Fix Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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_));
« no previous file with comments | « chrome/browser/ui/webui/settings/settings_clear_browsing_data_handler.cc ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698