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

Unified Diff: chrome/browser/browser_about_handler.cc

Issue 18728: Create a dialog box for the about:network view and kill the tab type.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 11 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/browser_about_handler.cc
===================================================================
--- chrome/browser/browser_about_handler.cc (revision 8567)
+++ chrome/browser/browser_about_handler.cc (working copy)
@@ -30,6 +30,7 @@
#include "chrome/browser/renderer_host/render_process_host.h"
#include "chrome/browser/renderer_host/render_view_host.h"
#include "chrome/browser/tab_contents/ipc_status_view.h"
+#include "chrome/browser/views/about_network_dialog.h"
#include "chrome/common/jstemplate_builder.h"
#include "chrome/common/l10n_util.h"
#include "chrome/common/pref_names.h"
@@ -173,9 +174,14 @@
}
if (LowerCaseEqualsASCII(url->path(), "network")) {
- // about:network doesn't have an internal protocol, so don't modify |url|.
- *result_type = TAB_CONTENTS_NETWORK_STATUS_VIEW;
- return true;
+ // Run the dialog. This will re-use the existing one if it's already up.
+ AboutNetworkDialog::RunDialog();
+
+ // Navigate the renderer to about:blank. This is kind of stupid but is the
+ // easiest thing to do in this situation without adding a lot of complexity
+ // for this developer-only feature.
+ *url = GURL("about:blank");
+ return false;
}
#ifdef IPC_MESSAGE_LOG_ENABLED

Powered by Google App Engine
This is Rietveld 408576698