summaryrefslogtreecommitdiffstats
path: root/chrome/browser/resources/net_internals
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/resources/net_internals')
-rw-r--r--chrome/browser/resources/net_internals/export_view.html2
-rw-r--r--chrome/browser/resources/net_internals/export_view.js12
2 files changed, 9 insertions, 5 deletions
diff --git a/chrome/browser/resources/net_internals/export_view.html b/chrome/browser/resources/net_internals/export_view.html
index 8a17a04..9a458f3 100644
--- a/chrome/browser/resources/net_internals/export_view.html
+++ b/chrome/browser/resources/net_internals/export_view.html
@@ -47,6 +47,6 @@
</p>
</div>
- <iframe style="display: none" id=export-view-download-iframe></iframe>
+ <a style="display: none" id=export-view-download-anchor download="net-internals-log.json"></a>
</div>
diff --git a/chrome/browser/resources/net_internals/export_view.js b/chrome/browser/resources/net_internals/export_view.js
index fd1563c..46069f5 100644
--- a/chrome/browser/resources/net_internals/export_view.js
+++ b/chrome/browser/resources/net_internals/export_view.js
@@ -25,8 +25,6 @@ var ExportView = (function() {
securityStrippingCheckbox.onclick =
this.onSetSecurityStripping_.bind(this, securityStrippingCheckbox);
- this.downloadIframe_ = $(ExportView.DOWNLOAD_IFRAME_ID);
-
this.saveFileButton_ = $(ExportView.SAVE_FILE_BUTTON_ID);
this.saveFileButton_.onclick = this.onSaveFile_.bind(this);
this.saveStatusText_ = $(ExportView.SAVE_STATUS_TEXT_ID);
@@ -46,7 +44,7 @@ var ExportView = (function() {
// IDs for special HTML elements in export_view.html
ExportView.MAIN_BOX_ID = 'export-view-tab-content';
- ExportView.DOWNLOAD_IFRAME_ID = 'export-view-download-iframe';
+ ExportView.DOWNLOAD_ANCHOR_ID = 'export-view-download-anchor';
ExportView.SAVE_FILE_BUTTON_ID = 'export-view-save-log-file';
ExportView.SAVE_STATUS_TEXT_ID = 'export-view-save-status-text';
ExportView.SECURITY_STRIPPING_CHECKBOX_ID =
@@ -186,7 +184,13 @@ var ExportView = (function() {
blobBuilder.append(dumpText, 'native');
var textBlob = blobBuilder.getBlob('octet/stream');
this.lastBlobURL_ = window.webkitURL.createObjectURL(textBlob);
- this.downloadIframe_.src = this.lastBlobURL_;
+
+ // Update the anchor tag and simulate a click on it to start the
+ // download.
+ var downloadAnchor = $(ExportView.DOWNLOAD_ANCHOR_ID);
+ downloadAnchor.href = this.lastBlobURL_;
+ downloadAnchor.click();
+
this.setSaveFileStatus('Dump successful', false);
}
};