diff options
author | megjablon <megjablon@chromium.org> | 2015-03-12 18:19:17 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-03-13 01:20:32 +0000 |
commit | bc2ef198cf3934848b78c58fc56f4e9f7e80c629 (patch) | |
tree | fd9af7b8b0bdd6abf5847b948160209d576efbcd /components/error_page | |
parent | 8eb56468216ac1f10ebc599f89621dbaaf605313 (diff) | |
download | chromium_src-bc2ef198cf3934848b78c58fc56f4e9f7e80c629.zip chromium_src-bc2ef198cf3934848b78c58fc56f4e9f7e80c629.tar.gz chromium_src-bc2ef198cf3934848b78c58fc56f4e9f7e80c629.tar.bz2 |
UMA for the "Show saved copy" experiment
Adds UMA to track when both the "Reload" and "Show Saved Copy"
buttons are displayed on a page and which one was clicked.
BUG=368049
Review URL: https://codereview.chromium.org/985103003
Cr-Commit-Position: refs/heads/master@{#320420}
Diffstat (limited to 'components/error_page')
-rw-r--r-- | components/error_page/common/net_error_info.h | 5 | ||||
-rw-r--r-- | components/error_page/renderer/net_error_helper_core.cc | 13 |
2 files changed, 18 insertions, 0 deletions
diff --git a/components/error_page/common/net_error_info.h b/components/error_page/common/net_error_info.h index bbb99eb..cb0905b 100644 --- a/components/error_page/common/net_error_info.h +++ b/components/error_page/common/net_error_info.h @@ -26,6 +26,11 @@ enum NetworkErrorPageEvent { NETWORK_ERROR_PAGE_BROWSER_INITIATED_RELOAD, // Reload from browser. + // Keep track of which button the user chooses when both are shown. + NETWORK_ERROR_PAGE_BOTH_BUTTONS_SHOWN, + NETWORK_ERROR_PAGE_BOTH_BUTTONS_RELOAD_CLICKED, + NETWORK_ERROR_PAGE_BOTH_BUTTONS_SHOWN_SAVED_COPY_CLICKED, + NETWORK_ERROR_PAGE_EVENT_MAX, }; diff --git a/components/error_page/renderer/net_error_helper_core.cc b/components/error_page/renderer/net_error_helper_core.cc index 7a6cfac..bc11897 100644 --- a/components/error_page/renderer/net_error_helper_core.cc +++ b/components/error_page/renderer/net_error_helper_core.cc @@ -588,6 +588,11 @@ void NetErrorHelperCore::OnFinishLoad(FrameType frame_type) { chrome_common_net::RecordEvent( chrome_common_net::NETWORK_ERROR_PAGE_SHOW_SAVED_COPY_BUTTON_SHOWN); } + if (committed_error_page_info_->reload_button_in_page && + committed_error_page_info_->show_saved_copy_button_in_page) { + chrome_common_net::RecordEvent( + chrome_common_net::NETWORK_ERROR_PAGE_BOTH_BUTTONS_SHOWN); + } delegate_->EnablePageHelperFunctions(); @@ -894,6 +899,10 @@ void NetErrorHelperCore::ExecuteButtonPress(Button button) { case RELOAD_BUTTON: chrome_common_net::RecordEvent( chrome_common_net::NETWORK_ERROR_PAGE_RELOAD_BUTTON_CLICKED); + if (committed_error_page_info_->show_saved_copy_button_in_page) { + chrome_common_net::RecordEvent( + chrome_common_net::NETWORK_ERROR_PAGE_BOTH_BUTTONS_RELOAD_CLICKED); + } navigation_from_button_ = RELOAD_BUTTON; Reload(); return; @@ -901,6 +910,10 @@ void NetErrorHelperCore::ExecuteButtonPress(Button button) { chrome_common_net::RecordEvent( chrome_common_net::NETWORK_ERROR_PAGE_SHOW_SAVED_COPY_BUTTON_CLICKED); navigation_from_button_ = SHOW_SAVED_COPY_BUTTON; + if (committed_error_page_info_->reload_button_in_page) { + chrome_common_net::RecordEvent(chrome_common_net:: + NETWORK_ERROR_PAGE_BOTH_BUTTONS_SHOWN_SAVED_COPY_CLICKED); + } delegate_->LoadPageFromCache( committed_error_page_info_->error.unreachableURL); return; |