Commit 0190a578 authored by Dale Curtis's avatar Dale Curtis Committed by Commit Bot

Use ukm::SourceId instead of too-small int32_t for UKM reports.

Without this we end up using bogus source ids for reporting to UKM
which end up dropped.

BUG=870407
TEST=none

Change-Id: I6dd43a70dad670613c9bffe440a5f4d8934d3a42
Reviewed-on: https://chromium-review.googlesource.com/1161162Reviewed-by: default avatarJustin DeWitt <dewittj@chromium.org>
Reviewed-by: default avatarSteven Holte <holte@chromium.org>
Commit-Queue: Dale Curtis <dalecurtis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#580337}
parent f7ac0562
...@@ -17,7 +17,7 @@ void OfflinePagesUkmReporter::ReportUrlOfflineRequest(const GURL& gurl, ...@@ -17,7 +17,7 @@ void OfflinePagesUkmReporter::ReportUrlOfflineRequest(const GURL& gurl,
return; return;
// This unique ID represents this whole navigation. // This unique ID represents this whole navigation.
int32_t source_id = ukm::UkmRecorder::GetNewSourceID(); ukm::SourceId source_id = ukm::UkmRecorder::GetNewSourceID();
// Associate the URL with this navigation. // Associate the URL with this navigation.
// TODO(petewil): re-enable once crbug/792197 is addressed. // TODO(petewil): re-enable once crbug/792197 is addressed.
......
...@@ -29,7 +29,7 @@ MediaMetricsProvider::~MediaMetricsProvider() { ...@@ -29,7 +29,7 @@ MediaMetricsProvider::~MediaMetricsProvider() {
if (!ukm_recorder || !initialized_) if (!ukm_recorder || !initialized_)
return; return;
const int32_t source_id = ukm_recorder->GetNewSourceID(); const ukm::SourceId source_id = ukm_recorder->GetNewSourceID();
// TODO(crbug.com/787209): Stop getting origin from the renderer. // TODO(crbug.com/787209): Stop getting origin from the renderer.
ukm_recorder->UpdateSourceURL(source_id, untrusted_top_origin_.GetURL()); ukm_recorder->UpdateSourceURL(source_id, untrusted_top_origin_.GetURL());
......
...@@ -282,7 +282,7 @@ void VideoDecodePerfHistory::ReportUkmMetrics( ...@@ -282,7 +282,7 @@ void VideoDecodePerfHistory::ReportUkmMetrics(
if (!ukm_recorder) if (!ukm_recorder)
return; return;
const int32_t source_id = ukm_recorder->GetNewSourceID(); const ukm::SourceId source_id = ukm_recorder->GetNewSourceID();
ukm::builders::Media_VideoDecodePerfRecord builder(source_id); ukm::builders::Media_VideoDecodePerfRecord builder(source_id);
// TODO(crbug.com/787209): Stop getting origin from the renderer. // TODO(crbug.com/787209): Stop getting origin from the renderer.
......
...@@ -344,7 +344,7 @@ void WatchTimeRecorder::RecordUkmPlaybackData() { ...@@ -344,7 +344,7 @@ void WatchTimeRecorder::RecordUkmPlaybackData() {
} }
for (auto& ukm_record : ukm_records_) { for (auto& ukm_record : ukm_records_) {
const int32_t source_id = ukm_recorder->GetNewSourceID(); const ukm::SourceId source_id = ukm_recorder->GetNewSourceID();
// TODO(crbug.com/787209): Stop getting origin from the renderer. // TODO(crbug.com/787209): Stop getting origin from the renderer.
ukm_recorder->UpdateSourceURL(source_id, untrusted_top_origin_.GetURL()); ukm_recorder->UpdateSourceURL(source_id, untrusted_top_origin_.GetURL());
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment