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

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

Issue 2287913002: Add hash to net-internals URL to launch net diagnostics extension Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 33d629345615f5b55f75ae8e72536696b210de33..68c9fcf4b1876c2f946a65fe97faea9f5afdcd68 100644
--- a/chrome/browser/resources/net_internals/main.js
+++ b/chrome/browser/resources/net_internals/main.js
@@ -225,6 +225,9 @@ var MainView = (function() {
onUrlHashChange_: function() {
var parsed = parseUrlHash_(window.location.hash);
+ //handle special case hash redirects
+ specialCaseHashRedirects_(window.location.hash);
+
if (!parsed)
return;
@@ -276,6 +279,19 @@ var MainView = (function() {
return {tabHash: tabHash, parameters: paramDict};
}
+ /**
+ * Handles special case hash redirects.
+ * These hashes do not have an associated view.
+ *
+ */
+ function specialCaseHashRedirects_(hash) {
+ // special case for chromeOS to launch built-in dignostics extension.
+ if (hash == '#diagnostics' && cr.isChromeOS) {
+ window.location =
+ 'chrome-extension://idddmepepmjcgiedknnmlbadcokidhoa/index.html';
+ }
+ }
+
return MainView;
})();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698