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

Unified Diff: chrome/browser/resources/net_internals/main.js

Issue 2856223006: Delete chrome://net-internals/#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: chrome/browser/resources/net_internals/main.js
diff --git a/chrome/browser/resources/net_internals/main.js b/chrome/browser/resources/net_internals/main.js
index 6b56557d625814e29980468a0332cc0c4a2bd00b..dbe70a9e335b72b7b1f05f0f4371a0029eca2b4b 100644
--- a/chrome/browser/resources/net_internals/main.js
+++ b/chrome/browser/resources/net_internals/main.js
@@ -129,7 +129,6 @@ var MainView = (function() {
// bar to indicate we're no longer capturing events. Also disable
// hiding cookies, so if the log dump has them, they'll be displayed.
this.topBarView_.switchToSubView('loaded').setFileName(opt_fileName);
- $(ExportView.PRIVACY_STRIPPING_CHECKBOX_ID).checked = false;
SourceTracker.getInstance().setPrivacyStripping(false);
} else {
// Otherwise, the "Stop Capturing" button was presumably pressed.
@@ -181,7 +180,6 @@ var MainView = (function() {
// the running OS should be created, so they can load log dumps from other
// OSes.
addTab(CaptureView);
- addTab(ExportView);
addTab(ImportView);
addTab(ProxyView);
addTab(EventsView);
@@ -228,9 +226,29 @@ var MainView = (function() {
if (!parsed)
return;
+ if (parsed.tabHash == "#export") {
+ // The #export tab was removed in M60, after having been
+ // deprecated since M58. In case anyone *still* has URLs
+ // bookmarked to this, inform them and redirect.
+ // TODO(eroman): Delete this around M62.
+ parsed.tabHash = undefined;
+
+ // Done on a setTimeout so it doesn't block the initial
+ // page load (confirm() is synchronous).
+ setTimeout(() => {
+ var navigateToNetExport = confirm(
+ "#export was removed\nDo you want to navigate to " +
+ "chrome://net-export/ instead?");
+ if (navigateToNetExport) {
+ window.location.href = "chrome://net-export";
+ return;
+ }
+ });
+ }
+
if (!parsed.tabHash) {
- // Default to the export tab.
- parsed.tabHash = ExportView.TAB_HASH;
+ // Default to the events tab.
+ parsed.tabHash = EventsView.TAB_HASH;
}
var tabId = this.hashToTabId_[parsed.tabHash];
« no previous file with comments | « chrome/browser/resources/net_internals/log_util.js ('k') | chrome/test/data/webui/net_internals/log_util.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698