Chromium Code Reviews| Index: pdf/out_of_process_instance.cc |
| diff --git a/pdf/out_of_process_instance.cc b/pdf/out_of_process_instance.cc |
| index 92511185c9715dd610adc6353cae440616666284..c8001250f8869c3b6d6c0b4402fb15894fc90796 100644 |
| --- a/pdf/out_of_process_instance.cc |
| +++ b/pdf/out_of_process_instance.cc |
| @@ -282,6 +282,7 @@ OutOfProcessInstance::OutOfProcessInstance(PP_Instance instance) |
| preview_document_load_state_(LOAD_STATE_COMPLETE), |
| uma_(this), |
| told_browser_about_unsupported_feature_(false), |
| + font_substitution_reported_(false), |
| print_preview_page_count_(0), |
| last_progress_sent_(0), |
| recently_sent_find_update_(false), |
| @@ -1206,6 +1207,8 @@ void OutOfProcessInstance::DocumentLoadComplete(int page_count) { |
| UserMetricsRecordAction("PDF.LoadSuccess"); |
| uma_.HistogramEnumeration("PDF.DocumentFeature", LOADED_DOCUMENT, |
| FEATURES_COUNT); |
| + if (!font_substitution_reported_) |
| + uma_.HistogramEnumeration("PDF.IsFontSubstituted", 0, 2); |
|
Lei Zhang
2016/10/11 22:35:59
We are going to record this on other platforms. Do
npm
2016/10/12 18:19:52
Should only record on Linux for now.
|
| // Note: If we are in print preview mode the scroll location is retained |
| // across document loads so we don't want to scroll again and override it. |
| @@ -1312,6 +1315,13 @@ void OutOfProcessInstance::DocumentLoadFailed() { |
| PostMessage(message); |
| } |
| +void OutOfProcessInstance::FontSubstituted() { |
| + if (font_substitution_reported_) |
| + return; |
| + font_substitution_reported_ = true; |
| + uma_.HistogramEnumeration("PDF.IsFontSubstituted", 1, 2); |
|
Lei Zhang
2016/10/11 22:35:59
Do we want constants instead of 1 and 2? (and 0 ab
npm
2016/10/12 18:19:52
They represent booleans, so I don't think that con
|
| +} |
| + |
| void OutOfProcessInstance::PreviewDocumentLoadFailed() { |
| UserMetricsRecordAction("PDF.PreviewDocumentLoadFailure"); |
| if (preview_document_load_state_ != LOAD_STATE_LOADING || |