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

Unified Diff: pdf/out_of_process_instance.cc

Issue 2479313005: Add font substituted metrics for OS other than Linux (Closed)
Patch Set: Move ifs inside methods Created 4 years, 1 month 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 523c3cb5b42497f34bb82993f9a644d5462081b3..36540f58920a3955bc17cb25d9f3ea2f2b226805 100644
--- a/pdf/out_of_process_instance.cc
+++ b/pdf/out_of_process_instance.cc
@@ -282,9 +282,7 @@ OutOfProcessInstance::OutOfProcessInstance(PP_Instance instance)
preview_document_load_state_(LOAD_STATE_COMPLETE),
uma_(this),
told_browser_about_unsupported_feature_(false),
-#if defined(OS_LINUX)
font_substitution_reported_(false),
-#endif
print_preview_page_count_(0),
last_progress_sent_(0),
recently_sent_find_update_(false),
@@ -1212,10 +1210,8 @@ 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.
@@ -1323,12 +1319,10 @@ void OutOfProcessInstance::DocumentLoadFailed() {
}
void OutOfProcessInstance::FontSubstituted() {
-#if defined(OS_LINUX)
if (font_substitution_reported_)
return;
font_substitution_reported_ = true;
uma_.HistogramEnumeration("PDF.IsFontSubstituted", 1, 2);
-#endif
}
void OutOfProcessInstance::PreviewDocumentLoadFailed() {

Powered by Google App Engine
This is Rietveld 408576698