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

Unified Diff: chrome/browser/resources/sync_file_system_internals/sync_service.js

Issue 16404008: Do not create instance just to expose SyncService methods from sync_service.js (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: addressed comments Created 7 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/sync_file_system_internals/sync_service.js
diff --git a/chrome/browser/resources/sync_file_system_internals/sync_service.js b/chrome/browser/resources/sync_file_system_internals/sync_service.js
index 29a0be64ff7891154570d546b2eea016d9b837fd..526b90fc5b57103d9fa7daed171a8217cc0e7e01 100644
--- a/chrome/browser/resources/sync_file_system_internals/sync_service.js
+++ b/chrome/browser/resources/sync_file_system_internals/sync_service.js
@@ -8,8 +8,7 @@
var syncService = (function() {
'use strict';
-function SyncService() {
-}
+var SyncService = {};
/**
* Request Sync Service Status.
@@ -22,7 +21,7 @@ function getServiceStatus() {
* Handles callback from getServiceStatus.
* @param {string} Service status enum as a string.
*/
-SyncService.prototype.onGetServiceStatus = function(statusString) {
+SyncService.onGetServiceStatus = function(statusString) {
$('service-status').textContent = statusString;
}
@@ -37,7 +36,7 @@ function getNotificationSource() {
* Handles callback from getNotificationSource.
* @param {string} Notification source as a string.
*/
-SyncService.prototype.onGetNotificationSource = function(sourceString) {
+SyncService.onGetNotificationSource = function(sourceString) {
$('notification-source').textContent = sourceString;
}
@@ -64,7 +63,7 @@ function getLog() {
* Handles callback from getUpdateLog.
* @param {Array} list List of dictionaries containing 'time' and 'logEvent'.
*/
-SyncService.prototype.onGetLog = function(logEntries) {
+SyncService.onGetLog = function(logEntries) {
var itemContainer = $('log-entries');
for (var i = 0; i < logEntries.length; i++) {
var logEntry = logEntries[i];
@@ -82,9 +81,11 @@ function main() {
cr.ui.decorate('tabbox', cr.ui.TabBox);
getServiceStatus();
getNotificationSource();
+
+ // TODO: Look for a way to push entries to the page when necessary.
window.setInterval(getLog, 1000);
}
document.addEventListener('DOMContentLoaded', main);
-return new SyncService;
+return SyncService;
})();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698