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

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

Issue 9826035: [Sync] Display the client server traffic log in about:sync. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: For review. Created 8 years, 8 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 (c) 2012 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 (function() {
rlarocque 2012/03/29 22:54:27 I don't think this is good style, though I'm not s
lipalani1 2012/03/29 23:58:37 ha ha I dont know either. I just copied from other
akalin 2012/03/30 01:55:04 This is the 'Javascript way' of avoiding pollution
6 var trafficToTextButton = document.getElementById('traffic-to-text');
7 var trafficDump = document.getElementById('traffic-dump');
8 trafficToTextButton.addEventListener('click', function(event) {
9 chrome.sync.getClientServerTraffic(printData);
10 });
11
12 function printData(trafficRecord) {
13 var traffic_data = '';
14 traffic_data += '===\n';
15 traffic_data += 'Client Server Traffic\n';
16 traffic_data += '===\n';
17 traffic_data += JSON.stringify(trafficRecord, null, 2);
18 traffic_data += '\n';
19
20 trafficDump.textContent = traffic_data;
21 }
22 })();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698