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

Unified Diff: chrome/browser/resources/sync_file_system_internals/file_metadata.js

Issue 23753007: Show file path rather than title in syncfs-internals (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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
Index: chrome/browser/resources/sync_file_system_internals/file_metadata.js
diff --git a/chrome/browser/resources/sync_file_system_internals/file_metadata.js b/chrome/browser/resources/sync_file_system_internals/file_metadata.js
index afcc4596f9c0715a08f500eb971d4f5d6506a2e2..cf24cc7b6cf09746bbc9f2d8b3f4f8f9390bda75 100644
--- a/chrome/browser/resources/sync_file_system_internals/file_metadata.js
+++ b/chrome/browser/resources/sync_file_system_internals/file_metadata.js
@@ -83,7 +83,7 @@ FileMetadata.onGetFileMetadata = function(fileMetadataMap) {
var tr = document.createElement('tr');
tr.appendChild(createElementFromText('td', 'Type'));
tr.appendChild(createElementFromText('td', 'Status'));
- tr.appendChild(createElementFromText('td', 'Title'));
+ tr.appendChild(createElementFromText('td', 'Path', {width: '250px'}));
tr.appendChild(createElementFromText('td', 'Details'));
header.appendChild(tr);
}
@@ -96,7 +96,7 @@ FileMetadata.onGetFileMetadata = function(fileMetadataMap) {
var tr = document.createElement('tr');
tr.appendChild(createFileIconCell(metadatEntry.type));
tr.appendChild(createElementFromText('td', metadatEntry.status));
- tr.appendChild(createElementFromText('td', metadatEntry.title));
+ tr.appendChild(createElementFromText('td', metadatEntry.path));
tr.appendChild(createElementFromDictionary('td', metadatEntry.details));
itemContainer.appendChild(tr);
}
@@ -112,35 +112,6 @@ function createFileIconCell(type) {
return td;
}
-// TODO(calvinlo): Move to helper file so it doesn't need to be duplicated.
-/**
- * Creates an element with |tagName| containing the content |text|.
- * @param {string} elementName Name of the new element to be created.
- * @param {string} text Text to be contained in the new element.
- * @return {HTMLElement} The newly created HTML element.
- */
-function createElementFromText(tagName, text) {
- var element = document.createElement(tagName);
- element.appendChild(document.createTextNode(text));
- return element;
-}
-
-/**
- * Creates an element with |tagName| containing the content |dict|.
- * @param {string} elementName Name of the new element to be created.
- * @param {Object.<string, string>} dict Dictionary to be contained in the new
- * element.
- * @return {HTMLElement} The newly created HTML element.
- */
-function createElementFromDictionary(tagName, dict) {
- var element = document.createElement(tagName);
- for (var key in dict) {
- element.appendChild(document.createTextNode(key + ': ' + dict[key]));
- element.appendChild(document.createElement('br'));
- }
- return element;
-}
-
function main() {
getExtensions();
$('refresh-metadata-button').addEventListener('click', getExtensions);

Powered by Google App Engine
This is Rietveld 408576698