Fix code style in extensions/firefox/content/PdfJsTelemetry.jsm
This commit is contained in:
parent
ac0f48c2fc
commit
80503e4197
@ -14,7 +14,8 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
/* jshint esnext:true */
|
/* jshint esnext:true, maxlen: 100 */
|
||||||
|
/* globals Components, Services */
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
@ -25,47 +26,47 @@ Cu.import('resource://gre/modules/Services.jsm');
|
|||||||
|
|
||||||
this.PdfJsTelemetry = {
|
this.PdfJsTelemetry = {
|
||||||
onViewerIsUsed: function () {
|
onViewerIsUsed: function () {
|
||||||
let histogram = Services.telemetry.getHistogramById("PDF_VIEWER_USED");
|
let histogram = Services.telemetry.getHistogramById('PDF_VIEWER_USED');
|
||||||
histogram.add(true);
|
histogram.add(true);
|
||||||
},
|
},
|
||||||
onFallback: function () {
|
onFallback: function () {
|
||||||
let histogram = Services.telemetry.getHistogramById("PDF_VIEWER_FALLBACK_SHOWN");
|
let histogram = Services.telemetry.getHistogramById('PDF_VIEWER_FALLBACK_SHOWN');
|
||||||
histogram.add(true);
|
histogram.add(true);
|
||||||
},
|
},
|
||||||
onDocumentSize: function (size) {
|
onDocumentSize: function (size) {
|
||||||
let histogram = Services.telemetry.getHistogramById("PDF_VIEWER_DOCUMENT_SIZE_KB");
|
let histogram = Services.telemetry.getHistogramById('PDF_VIEWER_DOCUMENT_SIZE_KB');
|
||||||
histogram.add(size / 1024);
|
histogram.add(size / 1024);
|
||||||
},
|
},
|
||||||
onDocumentVersion: function (versionId) {
|
onDocumentVersion: function (versionId) {
|
||||||
let histogram = Services.telemetry.getHistogramById("PDF_VIEWER_DOCUMENT_VERSION");
|
let histogram = Services.telemetry.getHistogramById('PDF_VIEWER_DOCUMENT_VERSION');
|
||||||
histogram.add(versionId);
|
histogram.add(versionId);
|
||||||
},
|
},
|
||||||
onDocumentGenerator: function (generatorId) {
|
onDocumentGenerator: function (generatorId) {
|
||||||
let histogram = Services.telemetry.getHistogramById("PDF_VIEWER_DOCUMENT_GENERATOR");
|
let histogram = Services.telemetry.getHistogramById('PDF_VIEWER_DOCUMENT_GENERATOR');
|
||||||
histogram.add(generatorId);
|
histogram.add(generatorId);
|
||||||
},
|
},
|
||||||
onEmbed: function (isObject) {
|
onEmbed: function (isObject) {
|
||||||
let histogram = Services.telemetry.getHistogramById("PDF_VIEWER_EMBED");
|
let histogram = Services.telemetry.getHistogramById('PDF_VIEWER_EMBED');
|
||||||
histogram.add(isObject);
|
histogram.add(isObject);
|
||||||
},
|
},
|
||||||
onFontType: function (fontTypeId) {
|
onFontType: function (fontTypeId) {
|
||||||
let histogram = Services.telemetry.getHistogramById("PDF_VIEWER_FONT_TYPES");
|
let histogram = Services.telemetry.getHistogramById('PDF_VIEWER_FONT_TYPES');
|
||||||
histogram.add(fontTypeId);
|
histogram.add(fontTypeId);
|
||||||
},
|
},
|
||||||
onForm: function (isAcroform) {
|
onForm: function (isAcroform) {
|
||||||
let histogram = Services.telemetry.getHistogramById("PDF_VIEWER_FORM");
|
let histogram = Services.telemetry.getHistogramById('PDF_VIEWER_FORM');
|
||||||
histogram.add(isAcroform);
|
histogram.add(isAcroform);
|
||||||
},
|
},
|
||||||
onPrint: function () {
|
onPrint: function () {
|
||||||
let histogram = Services.telemetry.getHistogramById("PDF_VIEWER_PRINT");
|
let histogram = Services.telemetry.getHistogramById('PDF_VIEWER_PRINT');
|
||||||
histogram.add(true);
|
histogram.add(true);
|
||||||
},
|
},
|
||||||
onStreamType: function (streamTypeId) {
|
onStreamType: function (streamTypeId) {
|
||||||
let histogram = Services.telemetry.getHistogramById("PDF_VIEWER_STREAM_TYPES");
|
let histogram = Services.telemetry.getHistogramById('PDF_VIEWER_STREAM_TYPES');
|
||||||
histogram.add(streamTypeId);
|
histogram.add(streamTypeId);
|
||||||
},
|
},
|
||||||
onTimeToView: function (ms) {
|
onTimeToView: function (ms) {
|
||||||
let histogram = Services.telemetry.getHistogramById("PDF_VIEWER_TIME_TO_VIEW_MS");
|
let histogram = Services.telemetry.getHistogramById('PDF_VIEWER_TIME_TO_VIEW_MS');
|
||||||
histogram.add(ms);
|
histogram.add(ms);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user