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

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

Issue 11343004: drive: Add "Delta Update Status" section to chrome:drive-internals (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 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 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 tr.appendChild(createElementFromText('td', app.app_name)); 158 tr.appendChild(createElementFromText('td', app.app_name));
159 tr.appendChild(createElementFromText('td', app.app_id)); 159 tr.appendChild(createElementFromText('td', app.app_id));
160 tr.appendChild(createElementFromText('td', app.object_type)); 160 tr.appendChild(createElementFromText('td', app.object_type));
161 tr.appendChild(createElementFromText('td', app.supports_create)); 161 tr.appendChild(createElementFromText('td', app.supports_create));
162 162
163 installedAppContainer.appendChild(tr); 163 installedAppContainer.appendChild(tr);
164 } 164 }
165 } 165 }
166 166
167 /** 167 /**
168 * Updates the summary about delta update status.
169 * @param {Object} deltaUpdateStatus Dictionary describing delta update status.
170 */
171 function updateDeltaUpdateStatus(deltaUpdateStatus) {
172 $('push-notification-enabled').textContent =
173 deltaUpdateStatus['push-notification-enabled'];
174 $('polling-interval-sec').textContent =
175 deltaUpdateStatus['polling-interval-sec'];
176 $('last-update-check-time').textContent =
177 deltaUpdateStatus['last-update-check-time'];
178 $('last-update-check-error').textContent =
179 deltaUpdateStatus['last-update-check-error'];
180 }
181
182 /**
168 * Creates an element named |elementName| containing the content |text|. 183 * Creates an element named |elementName| containing the content |text|.
169 * @param {string} elementName Name of the new element to be created. 184 * @param {string} elementName Name of the new element to be created.
170 * @param {string} text Text to be contained in the new element. 185 * @param {string} text Text to be contained in the new element.
171 * @return {HTMLElement} The newly created HTML element. 186 * @return {HTMLElement} The newly created HTML element.
172 */ 187 */
173 function createElementFromText(elementName, text) { 188 function createElementFromText(elementName, text) {
174 var element = document.createElement(elementName); 189 var element = document.createElement(elementName);
175 element.appendChild(document.createTextNode(text)); 190 element.appendChild(document.createTextNode(text));
176 return element; 191 return element;
177 } 192 }
(...skipping 27 matching lines...) Expand all
205 a.href = '#' + section.id; 220 a.href = '#' + section.id;
206 var li = document.createElement('li'); 221 var li = document.createElement('li');
207 li.appendChild(a); 222 li.appendChild(a);
208 toc.appendChild(li); 223 toc.appendChild(li);
209 } 224 }
210 225
211 window.setInterval(function() { 226 window.setInterval(function() {
212 chrome.send('periodicUpdate'); 227 chrome.send('periodicUpdate');
213 }, 1000); 228 }, 1000);
214 }); 229 });
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