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

Unified Diff: ui/file_manager/image_loader/request.js

Issue 1076173002: Files.app: Add metrics of RAW file loading time. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed. Created 5 years, 8 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
« no previous file with comments | « ui/file_manager/image_loader/manifest.json ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/file_manager/image_loader/request.js
diff --git a/ui/file_manager/image_loader/request.js b/ui/file_manager/image_loader/request.js
index e8cd3a5e742470fd98033873bfa7e9332162b674..b8b6c6f8ab3f8acf9c7592ec8374c91964d30d54 100644
--- a/ui/file_manager/image_loader/request.js
+++ b/ui/file_manager/image_loader/request.js
@@ -236,8 +236,14 @@ Request.prototype.downloadOriginal_ = function(onSuccess, onFailure) {
}
// Load RAW images by using Piex loader instead of XHR.
- if (FileType.getTypeForName(this.request_.url).type === 'raw') {
+ var fileType = FileType.getTypeForName(this.request_.url);
+ if (fileType.type === 'raw') {
+ var timer = metrics.getTracker().startTiming(
+ metrics.Categories.INTERNALS,
+ metrics.timing.Variables.EXTRACT_JPEG_FROM_RAW,
+ fileType.subtype);
this.piexLoader_.load(this.request_.url).then(function(data) {
+ timer.send();
var blob = new Blob([data.thumbnail], {type: 'image/jpeg'});
var url = URL.createObjectURL(blob);
this.image_.src = url;
« no previous file with comments | « ui/file_manager/image_loader/manifest.json ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698