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

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

Issue 571453002: Correct indentation, JSDoc, etc... to comply with closure linter. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 3 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/image_loader.js ('k') | ui/file_manager/image_loader/request.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/file_manager/image_loader/image_loader_client.js
diff --git a/ui/file_manager/image_loader/image_loader_client.js b/ui/file_manager/image_loader/image_loader_client.js
index 9baba5997b129ff6efd43a56d52586a585843bab..5876e20d375a14eb96fa0262f61f5bca38c9c516 100644
--- a/ui/file_manager/image_loader/image_loader_client.js
+++ b/ui/file_manager/image_loader/image_loader_client.js
@@ -231,13 +231,14 @@ ImageLoaderClient.Cache.MEMORY_LIMIT = 20 * 1024 * 1024; // 20 MB.
*/
ImageLoaderClient.Cache.createKey = function(url, opt_options) {
opt_options = opt_options || {};
- return JSON.stringify({url: url,
- orientation: opt_options.orientation,
- scale: opt_options.scale,
- width: opt_options.width,
- height: opt_options.height,
- maxWidth: opt_options.maxWidth,
- maxHeight: opt_options.maxHeight});
+ return JSON.stringify({
+ url: url,
+ orientation: opt_options.orientation,
+ scale: opt_options.scale,
+ width: opt_options.width,
+ height: opt_options.height,
+ maxWidth: opt_options.maxWidth,
+ maxHeight: opt_options.maxHeight});
};
/**
@@ -281,9 +282,11 @@ ImageLoaderClient.Cache.prototype.saveImage = function(
}
if (ImageLoaderClient.Cache.MEMORY_LIMIT - this.size_ >= data.length) {
- this.images_[key] = {lastLoadTimestamp: Date.now(),
- timestamp: opt_timestamp ? opt_timestamp : null,
- data: data};
+ this.images_[key] = {
+ lastLoadTimestamp: Date.now(),
+ timestamp: opt_timestamp ? opt_timestamp : null,
+ data: data
+ };
this.size_ += data.length;
}
};
@@ -344,8 +347,8 @@ ImageLoaderClient.Cache.prototype.removeImage = function(key) {
* @param {Image} image Image node to load the requested picture into.
* @param {Object} options Loader options, such as: orientation, scale,
* maxHeight, width, height and/or cache.
- * @param {function=} onSuccess Callback for success.
- * @param {function=} onError Callback for failure.
+ * @param {function} onSuccess Callback for success.
+ * @param {function} onError Callback for failure.
* @param {function=} opt_isValid Function returning false in case
* a request is not valid anymore, eg. parent node has been detached.
* @return {?number} Remote task id or null if loaded from cache.
« no previous file with comments | « ui/file_manager/image_loader/image_loader.js ('k') | ui/file_manager/image_loader/request.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698