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

Unified Diff: ui/file_manager/file_manager/foreground/js/naming_controller.js

Issue 1010163002: Files.app: Fix closure error which will raised by the updated compiler. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Define FakeEntry record type and use it. Created 5 years, 9 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
Index: ui/file_manager/file_manager/foreground/js/naming_controller.js
diff --git a/ui/file_manager/file_manager/foreground/js/naming_controller.js b/ui/file_manager/file_manager/foreground/js/naming_controller.js
index 50a6ff3c70724a431ee78f538ac578d33bbcac35..866cb8eca28d7e9d509e45f38c608fc2cc320794 100644
--- a/ui/file_manager/file_manager/foreground/js/naming_controller.js
+++ b/ui/file_manager/file_manager/foreground/js/naming_controller.js
@@ -94,7 +94,8 @@ NamingController.prototype.validateFileName = function(
* @return {Promise.<string>}
*/
NamingController.prototype.validateFileNameForSaving = function(filename) {
- var directory = this.directoryModel_.getCurrentDirEntry();
+ var directory = /** @type {DirectoryEntry} */ (
+ this.directoryModel_.getCurrentDirEntry());
var currentDirUrl = directory.toURL().replace(/\/?$/, '/');
var fileUrl = currentDirUrl + encodeURIComponent(filename);
@@ -339,7 +340,7 @@ NamingController.prototype.commitRename_ = function() {
// parent if the directory content is a search result. Fix it to do proper
// validation.
this.validateFileName(
- this.directoryModel_.getCurrentDirEntry(),
+ /** @type {DirectoryEntry} */ (this.directoryModel_.getCurrentDirEntry()),
newName,
validationDone.bind(this));
};

Powered by Google App Engine
This is Rietveld 408576698