Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(833)

Unified Diff: pdf/out_of_process_instance.cc

Issue 2398763002: Add font substitution metric for Linux (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..c2b7a2dcf6c9669cb518caf3f872a4d7980f1266 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),
@@ -1312,6 +1313,13 @@ void OutOfProcessInstance::DocumentLoadFailed() {
PostMessage(message);
}
+void OutOfProcessInstance::FontSubstituted() {
+ if (font_substitution_reported)
+ return;
+ font_substitution_reported = true;
rkaplow 2016/10/05 19:40:28 UserAction should generally be used when a user ha
npm 2016/10/05 19:53:03 I see this method being called for LoadFailure, Lo
rkaplow 2016/10/05 21:03:10 Yes, it's not ideal. It is still better for it to
+ UserMetricsRecordAction("PDF.FontSubstituted");
+}
+
void OutOfProcessInstance::PreviewDocumentLoadFailed() {
UserMetricsRecordAction("PDF.PreviewDocumentLoadFailure");
if (preview_document_load_state_ != LOAD_STATE_LOADING ||

Powered by Google App Engine
This is Rietveld 408576698