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

Side by Side Diff: chrome/browser/resources/sync_file_system_internals/sync_service.js

Issue 14765003: Gets the initial sync service status. In the next patch I'll make the syncfs-internals dashboard a … (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: arv review #1 Created 7 years, 7 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
(Empty)
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 /**
6 * WebUI to monitor the Sync File System Service.
7 */
8 var syncService = (function() {
9 'use strict';
10
11 /**
12 * Request Sync Service Status.
13 * Asynchronous, result via getServiceStatusResult.
14 */
15 function getServiceStatus() {
16 chrome.send('getServiceStatus');
17 }
18
19 /**
20 * Handles callback from getServiceStatus.
21 * @param {string} Service status enum as a string.
22 */
23 function getServiceStatusResult(statusString) {
24 console.log('getServiceStatusResult', statusString);
25 $('service-status').textContent = statusString;
26 }
27
28 /**
29 * Get initial sync service values and set listeners to get updated values.
30 */
31 function main() {
32 cr.ui.decorate('tabbox', cr.ui.TabBox);
33 getServiceStatus();
34 }
35
36 document.addEventListener('DOMContentLoaded', main);
37
38 // Must export callbacks as they are called directly from C++ handler code.
39 return {
40 getServiceStatusResult: getServiceStatusResult
41 };
42 })();
43
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698