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

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

Issue 11365249: drive: Event logger for chrome:drive-internals. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review fix (#5) Created 8 years, 1 month 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 Drive related Flags section. 6 * Updates the Drive related Flags section.
7 * @param {Array} flags List of dictionaries describing flags. 7 * @param {Array} flags List of dictionaries describing flags.
8 */ 8 */
9 function updateDriveRelatedFlags(flags) { 9 function updateDriveRelatedFlags(flags) {
10 var ul = $('drive-related-flags'); 10 var ul = $('drive-related-flags');
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 deltaUpdateStatus['push-notification-enabled']; 181 deltaUpdateStatus['push-notification-enabled'];
182 $('polling-interval-sec').textContent = 182 $('polling-interval-sec').textContent =
183 deltaUpdateStatus['polling-interval-sec']; 183 deltaUpdateStatus['polling-interval-sec'];
184 $('last-update-check-time').textContent = 184 $('last-update-check-time').textContent =
185 deltaUpdateStatus['last-update-check-time']; 185 deltaUpdateStatus['last-update-check-time'];
186 $('last-update-check-error').textContent = 186 $('last-update-check-error').textContent =
187 deltaUpdateStatus['last-update-check-error']; 187 deltaUpdateStatus['last-update-check-error'];
188 } 188 }
189 189
190 /** 190 /**
191 * Updates the event log section.
192 * @param {Array} log Array of events.
193 */
194 function updateEventLog(log) {
195 var ul = $('event-log');
196 updateKeyValueList(ul, log);
197 }
198
199 /**
191 * Creates an element named |elementName| containing the content |text|. 200 * Creates an element named |elementName| containing the content |text|.
192 * @param {string} elementName Name of the new element to be created. 201 * @param {string} elementName Name of the new element to be created.
193 * @param {string} text Text to be contained in the new element. 202 * @param {string} text Text to be contained in the new element.
194 * @return {HTMLElement} The newly created HTML element. 203 * @return {HTMLElement} The newly created HTML element.
195 */ 204 */
196 function createElementFromText(elementName, text) { 205 function createElementFromText(elementName, text) {
197 var element = document.createElement(elementName); 206 var element = document.createElement(elementName);
198 element.appendChild(document.createTextNode(text)); 207 element.appendChild(document.createTextNode(text));
199 return element; 208 return element;
200 } 209 }
(...skipping 27 matching lines...) Expand all
228 a.href = '#' + section.id; 237 a.href = '#' + section.id;
229 var li = document.createElement('li'); 238 var li = document.createElement('li');
230 li.appendChild(a); 239 li.appendChild(a);
231 toc.appendChild(li); 240 toc.appendChild(li);
232 } 241 }
233 242
234 window.setInterval(function() { 243 window.setInterval(function() {
235 chrome.send('periodicUpdate'); 244 chrome.send('periodicUpdate');
236 }, 1000); 245 }, 1000);
237 }); 246 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/chromeos/drive_internals.html ('k') | chrome/browser/ui/webui/chromeos/drive_internals_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698