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

Unified Diff: components/net_log/resources/net_export.js

Issue 2857973003: Add a "Show File" button to chrome://net-export/ (Closed)
Patch Set: Created 3 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 side-by-side diff with in-line comments
Download patch
Index: components/net_log/resources/net_export.js
diff --git a/components/net_log/resources/net_export.js b/components/net_log/resources/net_export.js
index 50c8e083a1589a138d54f2e012b1439cc38ce507..be7c8e24f5155fc6a321f46c796b2e8a739625ed 100644
--- a/components/net_log/resources/net_export.js
+++ b/components/net_log/resources/net_export.js
@@ -27,6 +27,7 @@ var NetExportView = (function() {
var kIdStartLoggingButton = 'start-logging';
var kIdStopLoggingButton = 'stop-logging';
var kIdEmailLogButton = 'mobile-email';
+ var kIdShowFileButton = 'show-file';
var kIdCaptureModeLogging = 'capture-mode-logging';
var kIdFilePathLogging = 'file-path-logging';
var kIdCaptureModeStopped = 'capture-mode-stopped';
@@ -73,6 +74,14 @@ var NetExportView = (function() {
},
/**
+ * Reveals the log file in the shell (i.e. selects it in the Finder on
+ * Mac).
+ */
+ onShowFile_: function() {
+ chrome.send('showFile');
+ },
+
+ /**
* Transitions back to the "Start logging to disk" state.
*/
onStartOver_: function() {
@@ -201,6 +210,9 @@ var NetExportView = (function() {
// The email button is only available in the mobile UI.
if ($(kIdEmailLogButton))
$(kIdEmailLogButton).onclick = this.onSendEmail_.bind(this);
+ // The show file button is only available in the desktop UI.
+ if ($(kIdShowFileButton))
+ $(kIdShowFileButton).onclick = this.onShowFile_.bind(this);
$(kIdStartOverButton).onclick = this.onStartOver_.bind(this);
$(kIdFilePathStoppedLogging).textContent = info.file;
« components/net_log/resources/net_export.html ('K') | « components/net_log/resources/net_export.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698