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

Unified Diff: chrome/browser/resources/file_manager/foreground/js/file_table.js

Issue 130533003: Remove fullPaths from the file_grid.js and file_table.js. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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: chrome/browser/resources/file_manager/foreground/js/file_table.js
diff --git a/chrome/browser/resources/file_manager/foreground/js/file_table.js b/chrome/browser/resources/file_manager/foreground/js/file_table.js
index c2c28297fbdcfca2ab33b133328d9c7b240c1ae3..c7333d45f42e54c5f74ae5eb38fe0b63afc8bb4f 100644
--- a/chrome/browser/resources/file_manager/foreground/js/file_table.js
+++ b/chrome/browser/resources/file_manager/foreground/js/file_table.js
@@ -957,14 +957,12 @@ filelist.decorateSelectionCheckbox = function(input, entry, list) {
*/
filelist.decorateListItem = function(li, entry, metadataCache) {
li.classList.add(entry.isDirectory ? 'directory' : 'file');
- // TODO(mtomasz): Use Entry instead of paths.
- if (PathUtil.isDriveBasedPath(entry.fullPath)) {
- // The metadata may not yet be ready. In that case, the list item will be
- // updated when the metadata is ready via updateListItemsMetadata.
- var driveProps = metadataCache.getCached(entry, 'drive');
- if (driveProps)
- filelist.updateListItemDriveProps(li, driveProps);
- }
+ // The metadata may not yet be ready. In that case, the list item will be
+ // updated when the metadata is ready via updateListItemsMetadata. For files
+ // not on Drive, driveProps is not available.
+ var driveProps = metadataCache.getCached(entry, 'drive');
+ if (driveProps)
+ filelist.updateListItemDriveProps(li, driveProps);
// Overriding the default role 'list' to 'listbox' for better
// accessibility on ChromeOS.

Powered by Google App Engine
This is Rietveld 408576698