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..512212130fb018fd1318ed1ee6237f99cd168cf1 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,10 @@ void OutOfProcessInstance::DocumentLoadComplete(int page_count) { |
| UserMetricsRecordAction("PDF.LoadSuccess"); |
| uma_.HistogramEnumeration("PDF.DocumentFeature", LOADED_DOCUMENT, |
| FEATURES_COUNT); |
| +#if defined(OS_LINUX) |
| + if (!font_substitution_reported_) |
| + uma_.HistogramEnumeration("PDF.IsFontSubstituted", 0, 2); |
| +#endif |
| // 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 +1317,13 @@ void OutOfProcessInstance::DocumentLoadFailed() { |
| PostMessage(message); |
| } |
| +void OutOfProcessInstance::FontSubstituted() { |
| + if (font_substitution_reported_) |
|
Lei Zhang
2016/10/12 18:56:38
Can we have a matching #if defined() here? Also fo
|
| + return; |
| + font_substitution_reported_ = true; |
| + uma_.HistogramEnumeration("PDF.IsFontSubstituted", 1, 2); |
| +} |
| + |
| void OutOfProcessInstance::PreviewDocumentLoadFailed() { |
| UserMetricsRecordAction("PDF.PreviewDocumentLoadFailure"); |
| if (preview_document_load_state_ != LOAD_STATE_LOADING || |