| 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..93dd8037ff2492686758616dad25cad08fc04181 100644
|
| --- a/pdf/out_of_process_instance.cc
|
| +++ b/pdf/out_of_process_instance.cc
|
| @@ -157,6 +157,11 @@ enum PDFFeatures {
|
| HAS_BOOKMARKS = 2,
|
| FEATURES_COUNT
|
| };
|
| +enum PDFFontSubstituted {
|
| + NO_FONT_SUBST = 0,
|
| + FONT_SUBSTITUTED = 1,
|
| + FONT_SUBST_BOOL
|
| +};
|
|
|
| PP_Var GetLinkAtPosition(PP_Instance instance, PP_Point point) {
|
| pp::Var var;
|
| @@ -282,6 +287,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 +1212,9 @@ void OutOfProcessInstance::DocumentLoadComplete(int page_count) {
|
| UserMetricsRecordAction("PDF.LoadSuccess");
|
| uma_.HistogramEnumeration("PDF.DocumentFeature", LOADED_DOCUMENT,
|
| FEATURES_COUNT);
|
| + if (!font_substitution_reported_)
|
| + uma_.HistogramEnumeration("PDF.FontSubstituted", NO_FONT_SUBST,
|
| + FONT_SUBST_BOOL);
|
|
|
| // 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 +1321,14 @@ void OutOfProcessInstance::DocumentLoadFailed() {
|
| PostMessage(message);
|
| }
|
|
|
| +void OutOfProcessInstance::FontSubstituted() {
|
| + if (font_substitution_reported_)
|
| + return;
|
| + font_substitution_reported_ = true;
|
| + uma_.HistogramEnumeration("PDF.FontSubstituted", FONT_SUBSTITUTED,
|
| + FONT_SUBST_BOOL);
|
| +}
|
| +
|
| void OutOfProcessInstance::PreviewDocumentLoadFailed() {
|
| UserMetricsRecordAction("PDF.PreviewDocumentLoadFailure");
|
| if (preview_document_load_state_ != LOAD_STATE_LOADING ||
|
|
|