commit | dcca7e4d8ec5df259ea52029de6696f54f094aee | [log] [tgz] |
---|---|---|
author | Xing Liu <[email protected]> | Wed Jan 17 19:19:21 2018 |
committer | Commit Bot <[email protected]> | Wed Jan 17 19:19:21 2018 |
tree | d8f719cf4d88345b9196105bb129a48f952b5499 | |
parent | 0b50e9bff0858f771c6abd299a3388545cc36b03 [diff] [blame] |
Download metric: Use new DownloadSource enum. In addition to current key metrics of content download system, specific use cases are recorded with suffixes. [email protected], [email protected] Bug: 786482 Change-Id: I191e4eb1d04a2c90ab2b945c154b909aa4332094 Reviewed-on: https://chromium-review.googlesource.com/851061 Commit-Queue: Xing Liu <[email protected]> Reviewed-by: Xing Liu <[email protected]> Reviewed-by: Min Qin <[email protected]> Reviewed-by: Jesse Doherty <[email protected]> Reviewed-by: John Abd-El-Malek <[email protected]> Reviewed-by: David Trainor <[email protected]> Cr-Commit-Position: refs/heads/master@{#529846}
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc index dceae73..9a152f6 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc
@@ -3276,7 +3276,7 @@ void WebContentsImpl::OnSavePage() { // If we can not save the page, try to download it. if (!IsSavable()) { - RecordDownloadSource(INITIATED_BY_SAVE_PACKAGE_ON_NON_HTML); + RecordSavePackageEvent(SAVE_PACKAGE_DOWNLOAD_ON_NON_HTML); SaveFrame(GetLastCommittedURL(), Referrer()); return; } @@ -3370,6 +3370,7 @@ params->add_request_header(key_value.first, key_value.second); } } + params->set_download_source(DownloadSource::WEB_CONTENTS_API); BrowserContext::GetDownloadManager(GetBrowserContext()) ->DownloadUrl(std::move(params)); }