OLD | NEW |
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 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 | 167 |
168 itemContainer.appendChild(tr); | 168 itemContainer.appendChild(tr); |
169 } | 169 } |
170 } | 170 } |
171 | 171 |
172 /** | 172 /** |
173 * Updates the local cache information about account metadata. | 173 * Updates the local cache information about account metadata. |
174 * @param {Object} localMetadata Dictionary describing account metadata. | 174 * @param {Object} localMetadata Dictionary describing account metadata. |
175 */ | 175 */ |
176 function updateLocalMetadata(localMetadata) { | 176 function updateLocalMetadata(localMetadata) { |
| 177 var changestamp = localMetadata['account-largest-changestamp-local']; |
| 178 |
177 $('account-largest-changestamp-local').textContent = | 179 $('account-largest-changestamp-local').textContent = |
178 localMetadata['account-largest-changestamp-local']; | 180 changestamp.toString() + |
179 $('account-metadata-loaded').textContent = | 181 (changestamp > 0 ? ' (loaded)' : ' (not loaded)') + |
180 localMetadata['account-metadata-loaded'].toString() + | |
181 (localMetadata['account-metadata-refreshing'] ? ' (refreshing)' : ''); | 182 (localMetadata['account-metadata-refreshing'] ? ' (refreshing)' : ''); |
182 } | 183 } |
183 | 184 |
184 /** | 185 /** |
185 * Updates the summary about delta update status. | 186 * Updates the summary about delta update status. |
186 * @param {Object} deltaUpdateStatus Dictionary describing delta update status. | 187 * @param {Object} deltaUpdateStatus Dictionary describing delta update status. |
187 */ | 188 */ |
188 function updateDeltaUpdateStatus(deltaUpdateStatus) { | 189 function updateDeltaUpdateStatus(deltaUpdateStatus) { |
189 $('push-notification-enabled').textContent = | 190 $('push-notification-enabled').textContent = |
190 deltaUpdateStatus['push-notification-enabled']; | 191 deltaUpdateStatus['push-notification-enabled']; |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
260 $('button-show-file-entries').addEventListener('click', function() { | 261 $('button-show-file-entries').addEventListener('click', function() { |
261 var button = $('button-show-file-entries'); | 262 var button = $('button-show-file-entries'); |
262 button.parentNode.removeChild(button); | 263 button.parentNode.removeChild(button); |
263 chrome.send('listFileEntries'); | 264 chrome.send('listFileEntries'); |
264 }); | 265 }); |
265 | 266 |
266 window.setInterval(function() { | 267 window.setInterval(function() { |
267 chrome.send('periodicUpdate'); | 268 chrome.send('periodicUpdate'); |
268 }, 1000); | 269 }, 1000); |
269 }); | 270 }); |
OLD | NEW |