diff options
author | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-12 19:23:05 +0000 |
---|---|---|
committer | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-12 19:23:05 +0000 |
commit | 1913411a1e351b0a8b9b1e1cc7d830380fe5716f (patch) | |
tree | 4405b46e6749cd3749009fa31809ae5fca8476c3 /chrome/browser/browser_about_handler.cc | |
parent | cad53097583e754d912742e4b632928cd25cf2c9 (diff) | |
download | chromium_src-1913411a1e351b0a8b9b1e1cc7d830380fe5716f.zip chromium_src-1913411a1e351b0a8b9b1e1cc7d830380fe5716f.tar.gz chromium_src-1913411a1e351b0a8b9b1e1cc7d830380fe5716f.tar.bz2 |
Port browser_about_handler. Some parts are still NOTIMPLEMENTED.
Review URL: http://codereview.chromium.org/20300
Patch from Craig Schlenter <craig.schlenter@gmail.com>.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9685 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser_about_handler.cc')
-rw-r--r-- | chrome/browser/browser_about_handler.cc | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/chrome/browser/browser_about_handler.cc b/chrome/browser/browser_about_handler.cc index bf89af0..d92c15f 100644 --- a/chrome/browser/browser_about_handler.cc +++ b/chrome/browser/browser_about_handler.cc @@ -23,7 +23,6 @@ #include "chrome/browser/profile.h" #include "chrome/browser/profile_manager.h" #include "chrome/browser/renderer_host/render_view_host.h" -#include "chrome/browser/views/about_ipc_dialog.h" #include "chrome/common/jstemplate_builder.h" #include "chrome/common/l10n_util.h" #include "chrome/common/pref_names.h" @@ -37,6 +36,7 @@ #endif #if defined(OS_WIN) +#include "chrome/browser/views/about_ipc_dialog.h" #include "chrome/browser/views/about_network_dialog.h" #endif @@ -111,7 +111,7 @@ void AboutSource::StartDataRequest(const std::string& path_raw, int request_id) { std::string path = path_raw; std::string info; - if (path.find("/") != -1) { + if (path.find("/") != std::string::npos) { size_t pos = path.find("/"); info = path.substr(pos + 1, path.length() - (pos + 1)); path = path.substr(0, pos); @@ -172,8 +172,13 @@ bool BrowserAboutHandler::MaybeHandle(GURL* url, } if (LowerCaseEqualsASCII(url->path(), "network")) { +#if defined(OS_WIN) // Run the dialog. This will re-use the existing one if it's already up. AboutNetworkDialog::RunDialog(); +#else + NOTIMPLEMENTED(); + // TODO(port) Implement this. +#endif // 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 @@ -184,8 +189,13 @@ bool BrowserAboutHandler::MaybeHandle(GURL* url, #ifdef IPC_MESSAGE_LOG_ENABLED if (LowerCaseEqualsASCII(url->path(), "ipc")) { +#if defined(OS_WIN) // Run the dialog. This will re-use the existing one if it's already up. AboutIPCDialog::RunDialog(); +#else + NOTIMPLEMENTED(); + // TODO(port) Implement this. +#endif *url = GURL("about:blank"); return false; } @@ -390,7 +400,7 @@ std::string BrowserAboutHandler::AboutStats() { // JSON doesn't allow '.' in names. size_t pos; - while ((pos = name.find(".")) != -1) + while ((pos = name.find(".")) != std::string::npos) name.replace(pos, 1, ":"); // Try to see if this name already exists. |