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

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 submitting. 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 100644
index 0000000000000000000000000000000000000000..58989f448b9c4cec2dbdf7f3cea767c8f2710e76
--- /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');
+ 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;
+}
+})();
« no previous file with comments | « chrome/browser/resources/sync_internals/traffic.html ('k') | chrome/browser/resources/sync_internals_resources.grd » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698