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

Side by Side Diff: chrome/browser/resources/chromeos/drive_internals.js

Issue 10821051: gdata: Add File System Contents section to chrome:drive-internals (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * Updates the Authentication Status section. 6 * Updates the Authentication Status section.
7 * @param {Object} authStatus Dictionary containing auth status. 7 * @param {Object} authStatus Dictionary containing auth status.
8 */ 8 */
9 function UpdateAuthStatus(authStatus) { 9 function UpdateAuthStatus(authStatus) {
10 $('has-refresh-token').textContent = authStatus['has-refresh-token']; 10 $('has-refresh-token').textContent = authStatus['has-refresh-token'];
(...skipping 26 matching lines...) Expand all
37 path += '@'; 37 path += '@';
38 38
39 tr.appendChild(createElementFromText('td', path)); 39 tr.appendChild(createElementFromText('td', path));
40 tr.appendChild(createElementFromText('td', entry.size)); 40 tr.appendChild(createElementFromText('td', entry.size));
41 tr.appendChild(createElementFromText('td', entry.last_modified)); 41 tr.appendChild(createElementFromText('td', entry.last_modified));
42 tbody.appendChild(tr); 42 tbody.appendChild(tr);
43 } 43 }
44 } 44 }
45 45
46 /** 46 /**
47 * Updates the File System Contents section.
48 * @param {string} fileSystemAsText Pre-formatted string representation of the
49 * file system contents.
50 */
51 function UpdateFileSystemContents(fileSystemAsText) {
52 $('file-system-contents').textContent = fileSystemAsText;
53 }
54
55 /**
47 * Creates an element named |elementName| containing the content |text|. 56 * Creates an element named |elementName| containing the content |text|.
48 * @param {string} elementName Name of the new element to be created. 57 * @param {string} elementName Name of the new element to be created.
49 * @param {string} text Text to be contained in the new element. 58 * @param {string} text Text to be contained in the new element.
50 * @return {HTMLElement} The newly created HTML element. 59 * @return {HTMLElement} The newly created HTML element.
51 */ 60 */
52 function createElementFromText(elementName, text) { 61 function createElementFromText(elementName, text) {
53 var element = document.createElement(elementName); 62 var element = document.createElement(elementName);
54 element.appendChild(document.createTextNode(text)); 63 element.appendChild(document.createTextNode(text));
55 return element; 64 return element;
56 } 65 }
57 66
58 document.addEventListener('DOMContentLoaded', function() { 67 document.addEventListener('DOMContentLoaded', function() {
59 chrome.send('pageLoaded'); 68 chrome.send('pageLoaded');
60 }); 69 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698