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

Unified 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, 9 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
Index: chrome/browser/resources/sync_internals/traffic.js
diff --git a/chrome/browser/resources/sync_internals/traffic.js b/chrome/browser/resources/sync_internals/traffic.js
new file mode 100755
index 0000000000000000000000000000000000000000..42a92a3b52971f11bcb769fef44374221869b4f9
--- /dev/null
+++ b/chrome/browser/resources/sync_internals/traffic.js
@@ -0,0 +1,22 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+(function() {
+var trafficToTextButton = document.getElementById('traffic-to-text');
Andrew T Wilson (Slow) 2012/03/30 21:18:56 I think you should indent this by two spaces - or
lipalani1 2012/03/30 23:34:05 Done.
+var trafficDump = document.getElementById('traffic-dump');
+trafficToTextButton.addEventListener('click', function(event) {
+ chrome.sync.getClientServerTraffic(printData);
+});
+
+function printData(trafficRecord) {
+ var traffic_data = '';
+ traffic_data += '===\n';
+ traffic_data += 'Client Server Traffic\n';
+ traffic_data += '===\n';
+ traffic_data += JSON.stringify(trafficRecord, null, 2);
+ traffic_data += '\n';
+
+ trafficDump.textContent = traffic_data;
+}
+})();

Powered by Google App Engine
This is Rietveld 408576698