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

Side by Side Diff: chrome/browser/resources/sync_internals/chrome_sync.js

Issue 134443004: sync: Remove some WebUI debug functions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 11 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
« no previous file with comments | « build/ios/grit_whitelist.txt ('k') | chrome/browser/resources/sync_internals/data.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 var chrome = chrome || {}; 5 var chrome = chrome || {};
6 6
7 // TODO(akalin): Add mocking code for e.g. chrome.send() so that we 7 // TODO(akalin): Add mocking code for e.g. chrome.send() so that we
8 // can test this without rebuilding chrome. 8 // can test this without rebuilding chrome.
9 9
10 /** 10 /**
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 139
140 var syncFunctions = [ 140 var syncFunctions = [
141 // Sync service functions. 141 // Sync service functions.
142 'getAboutInfo', 142 'getAboutInfo',
143 143
144 // Notification functions. See chrome/browser/sync/engine/syncapi.h 144 // Notification functions. See chrome/browser/sync/engine/syncapi.h
145 // for docs. 145 // for docs.
146 'getNotificationState', 146 'getNotificationState',
147 'getNotificationInfo', 147 'getNotificationInfo',
148 148
149 // Get a static list of available data types.
150 'getListOfTypes',
151
149 // Client server communication logging functions. 152 // Client server communication logging functions.
150 'getClientServerTraffic', 153 'getClientServerTraffic',
151 154
152 // Node lookup functions. See chrome/browser/sync/engine/syncapi.h 155 // Get an array containing a JSON representations of all known sync nodes.
153 // for docs.
154 'getRootNodeDetails',
155 'getNodeSummariesById',
156 'getNodeDetailsById',
157 'getChildNodeIds',
158 'getAllNodes', 156 'getAllNodes',
159 ]; 157 ];
160 158
161 for (var i = 0; i < syncFunctions.length; ++i) { 159 for (var i = 0; i < syncFunctions.length; ++i) {
162 var syncFunction = syncFunctions[i]; 160 var syncFunction = syncFunctions[i];
163 chrome.sync[syncFunction] = makeSyncFunction(syncFunction); 161 chrome.sync[syncFunction] = makeSyncFunction(syncFunction);
164 } 162 }
165 163
166 /** 164 /**
167 * Returns an object which measures elapsed time. 165 * Returns an object which measures elapsed time.
168 */ 166 */
169 chrome.sync.makeTimer = function() { 167 chrome.sync.makeTimer = function() {
170 var start = new Date(); 168 var start = new Date();
171 169
172 return { 170 return {
173 /** 171 /**
174 * @return {number} The number of seconds since the timer was 172 * @return {number} The number of seconds since the timer was
175 * created. 173 * created.
176 */ 174 */
177 get elapsedSeconds() { 175 get elapsedSeconds() {
178 return ((new Date()).getTime() - start.getTime()) / 1000.0; 176 return ((new Date()).getTime() - start.getTime()) / 1000.0;
179 } 177 }
180 }; 178 };
181 }; 179 };
182 180
183 })(); 181 })();
OLDNEW
« no previous file with comments | « build/ios/grit_whitelist.txt ('k') | chrome/browser/resources/sync_internals/data.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698