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

Issue 2398763002: Add font substitution metric for Linux (Closed)

Created:
4 years, 2 months ago by npm
Modified:
4 years, 2 months ago
CC:
chromium-reviews, asvitkine+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add font map user metrics for Linux. The method MapFont, defined in pdfium_engine.cc, is used by Chrome on Linux to find a substitute font whenever a pdf file uses a font which is not embedded (or could not be loaded). When this method is called, the method UserMetricsRecordAction will now be called to record that this document has requested a substitute font. Adding similar functionality for other OS's will take more effort just because the MapFont definitions are completely inside pdfium core. BUG=chromium:448584 Committed: https://crrev.com/d24ca0432921fdf310c781c3a63aac7387306a9f Cr-Commit-Position: refs/heads/master@{#424877}

Patch Set 1 #

Total comments: 5

Patch Set 2 : Use histogram instead of action #

Total comments: 1

Patch Set 3 : Using Boolean #

Total comments: 7

Patch Set 4 : Use ScopedSubstFont #

Patch Set 5 : Restore spacing #

Total comments: 2

Patch Set 6 : Comments #

Patch Set 7 : No ScopedSubstFont in PDFiumEngineExports #

Unified diffs Side-by-side diffs Delta from patch set Stats (+79 lines, -0 lines) Patch
M pdf/out_of_process_instance.h View 1 2 3 4 5 2 chunks +7 lines, -0 lines 0 comments Download
M pdf/out_of_process_instance.cc View 1 2 3 4 5 3 chunks +16 lines, -0 lines 0 comments Download
M pdf/pdf_engine.h View 1 chunk +3 lines, -0 lines 0 comments Download
M pdf/pdfium/pdfium_engine.h View 1 2 3 4 5 2 chunks +16 lines, -0 lines 0 comments Download
M pdf/pdfium/pdfium_engine.cc View 1 2 3 4 5 6 8 chunks +22 lines, -0 lines 0 comments Download
M pdf/pdfium/pdfium_page.cc View 1 2 3 2 chunks +2 lines, -0 lines 0 comments Download
M pdf/preview_mode_client.h View 1 chunk +1 line, -0 lines 0 comments Download
M pdf/preview_mode_client.cc View 1 chunk +4 lines, -0 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 2 3 1 chunk +8 lines, -0 lines 0 comments Download

Messages

Total messages: 27 (9 generated)
npm
PTAL Lei for pdf part, Robert for metrics part
4 years, 2 months ago (2016-10-05 19:32:57 UTC) #3
rkaplow
https://codereview.chromium.org/2398763002/diff/1/pdf/out_of_process_instance.cc File pdf/out_of_process_instance.cc (right): https://codereview.chromium.org/2398763002/diff/1/pdf/out_of_process_instance.cc#newcode1319 pdf/out_of_process_instance.cc:1319: font_substitution_reported = true; UserAction should generally be used when ...
4 years, 2 months ago (2016-10-05 19:40:29 UTC) #4
npm
https://codereview.chromium.org/2398763002/diff/1/pdf/out_of_process_instance.cc File pdf/out_of_process_instance.cc (right): https://codereview.chromium.org/2398763002/diff/1/pdf/out_of_process_instance.cc#newcode1319 pdf/out_of_process_instance.cc:1319: font_substitution_reported = true; On 2016/10/05 19:40:28, rkaplow wrote: > ...
4 years, 2 months ago (2016-10-05 19:53:03 UTC) #5
Lei Zhang
https://codereview.chromium.org/2398763002/diff/1/pdf/out_of_process_instance.h File pdf/out_of_process_instance.h (right): https://codereview.chromium.org/2398763002/diff/1/pdf/out_of_process_instance.h#newcode315 pdf/out_of_process_instance.h:315: bool font_substitution_reported; members need a trailing underscore.
4 years, 2 months ago (2016-10-05 20:48:09 UTC) #6
rkaplow
https://codereview.chromium.org/2398763002/diff/1/pdf/out_of_process_instance.cc File pdf/out_of_process_instance.cc (right): https://codereview.chromium.org/2398763002/diff/1/pdf/out_of_process_instance.cc#newcode1319 pdf/out_of_process_instance.cc:1319: font_substitution_reported = true; On 2016/10/05 19:53:03, npm wrote: > ...
4 years, 2 months ago (2016-10-05 21:03:10 UTC) #7
npm
PTAL https://codereview.chromium.org/2398763002/diff/1/pdf/out_of_process_instance.h File pdf/out_of_process_instance.h (right): https://codereview.chromium.org/2398763002/diff/1/pdf/out_of_process_instance.h#newcode315 pdf/out_of_process_instance.h:315: bool font_substitution_reported; On 2016/10/05 20:48:09, Lei Zhang wrote: ...
4 years, 2 months ago (2016-10-06 15:20:47 UTC) #8
rkaplow
https://codereview.chromium.org/2398763002/diff/20001/tools/metrics/histograms/histograms.xml File tools/metrics/histograms/histograms.xml (right): https://codereview.chromium.org/2398763002/diff/20001/tools/metrics/histograms/histograms.xml#newcode41635 tools/metrics/histograms/histograms.xml:41635: +<histogram name="PDF.FontSubstituted" enum="PDFFontSubstituted"> I would just use Boolean, and ...
4 years, 2 months ago (2016-10-07 17:40:31 UTC) #9
npm
Changed to Boolean in histograms.xml
4 years, 2 months ago (2016-10-07 18:25:57 UTC) #10
rkaplow
lgtm
4 years, 2 months ago (2016-10-11 15:30:17 UTC) #11
Lei Zhang
https://codereview.chromium.org/2398763002/diff/40001/pdf/out_of_process_instance.cc File pdf/out_of_process_instance.cc (right): https://codereview.chromium.org/2398763002/diff/40001/pdf/out_of_process_instance.cc#newcode1211 pdf/out_of_process_instance.cc:1211: uma_.HistogramEnumeration("PDF.IsFontSubstituted", 0, 2); We are going to record this ...
4 years, 2 months ago (2016-10-11 22:35:59 UTC) #12
npm
PTAL Lei https://codereview.chromium.org/2398763002/diff/40001/pdf/out_of_process_instance.cc File pdf/out_of_process_instance.cc (right): https://codereview.chromium.org/2398763002/diff/40001/pdf/out_of_process_instance.cc#newcode1211 pdf/out_of_process_instance.cc:1211: uma_.HistogramEnumeration("PDF.IsFontSubstituted", 0, 2); On 2016/10/11 22:35:59, Lei ...
4 years, 2 months ago (2016-10-12 18:19:53 UTC) #13
Lei Zhang
https://codereview.chromium.org/2398763002/diff/40001/pdf/pdfium/pdfium_engine.cc File pdf/pdfium/pdfium_engine.cc (right): https://codereview.chromium.org/2398763002/diff/40001/pdf/pdfium/pdfium_engine.cc#newcode2455 pdf/pdfium/pdfium_engine.cc:2455: g_client_for_fontmapper_ = client_; On 2016/10/12 18:19:52, npm wrote: > ...
4 years, 2 months ago (2016-10-12 18:46:58 UTC) #14
Lei Zhang
lgtm https://codereview.chromium.org/2398763002/diff/80001/pdf/out_of_process_instance.cc File pdf/out_of_process_instance.cc (right): https://codereview.chromium.org/2398763002/diff/80001/pdf/out_of_process_instance.cc#newcode1321 pdf/out_of_process_instance.cc:1321: if (font_substitution_reported_) Can we have a matching #if ...
4 years, 2 months ago (2016-10-12 18:56:38 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2398763002/100001
4 years, 2 months ago (2016-10-12 19:36:53 UTC) #18
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_x64_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_rel_ng/builds/296704)
4 years, 2 months ago (2016-10-12 20:20:00 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2398763002/120001
4 years, 2 months ago (2016-10-12 20:30:32 UTC) #23
commit-bot: I haz the power
Committed patchset #7 (id:120001)
4 years, 2 months ago (2016-10-12 22:05:58 UTC) #25
commit-bot: I haz the power
4 years, 2 months ago (2016-10-12 22:08:34 UTC) #27
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/d24ca0432921fdf310c781c3a63aac7387306a9f
Cr-Commit-Position: refs/heads/master@{#424877}

Powered by Google App Engine
This is Rietveld 408576698