diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-01 05:49:17 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-01 05:49:17 +0000 |
commit | 2f89b6045896d8e8efc3984da72c3bf4c63d6e0f (patch) | |
tree | 774039d8e16e8d865a3c3380954410548cd5a615 | |
parent | 7bf84bbe1bb130c315c9ab9bbf1ff69772e50be8 (diff) | |
download | chromium_src-2f89b6045896d8e8efc3984da72c3bf4c63d6e0f.zip chromium_src-2f89b6045896d8e8efc3984da72c3bf4c63d6e0f.tar.gz chromium_src-2f89b6045896d8e8efc3984da72c3bf4c63d6e0f.tar.bz2 |
Remove chrome/browser/browser_about_handler.h dependency from content.
BUG=76697
Review URL: http://codereview.chromium.org/7027016
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87437 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/browser_about_handler.cc | 4 | ||||
-rw-r--r-- | chrome/browser/ui/browser_navigator.cc | 11 | ||||
-rw-r--r-- | chrome/common/url_constants.cc | 2 | ||||
-rw-r--r-- | chrome/common/url_constants.h | 2 | ||||
-rw-r--r-- | content/browser/DEPS | 2 | ||||
-rw-r--r-- | content/browser/tab_contents/navigation_controller.cc | 8 |
6 files changed, 11 insertions, 18 deletions
diff --git a/chrome/browser/browser_about_handler.cc b/chrome/browser/browser_about_handler.cc index 40d6b62..d7f07ab 100644 --- a/chrome/browser/browser_about_handler.cc +++ b/chrome/browser/browser_about_handler.cc @@ -1413,14 +1413,12 @@ void InitializeAboutDataSource(Profile* profile) { profile->GetChromeURLDataManager()->AddDataSource(new AboutSource(profile)); } -// This function gets called with the fixed-up chrome: URLs, so we have to -// compare against those instead of "about:blah". bool HandleNonNavigationAboutURL(const GURL& url) { // about:ipc is currently buggy, so we disable it for official builds. #if !defined(OFFICIAL_BUILD) #if (defined(OS_MACOSX) || defined(OS_WIN)) && defined(IPC_MESSAGE_LOG_ENABLED) - if (LowerCaseEqualsASCII(url.spec(), chrome::kChromeUIIPCURL)) { + if (LowerCaseEqualsASCII(url.spec(), chrome::kAboutIPCURL)) { // Run the dialog. This will re-use the existing one if it's already up. browser::ShowAboutIPCDialog(); return true; diff --git a/chrome/browser/ui/browser_navigator.cc b/chrome/browser/ui/browser_navigator.cc index d6771a53..7fb0d5b 100644 --- a/chrome/browser/ui/browser_navigator.cc +++ b/chrome/browser/ui/browser_navigator.cc @@ -7,6 +7,7 @@ #include <algorithm> #include "base/command_line.h" +#include "chrome/browser/browser_about_handler.h" #include "chrome/browser/browser_url_handler.h" #include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/extensions/extension_tab_helper.h" @@ -480,9 +481,13 @@ void Navigate(NavigateParams* params) { tab_contents())->OnUserGesture(); } - // Perform the actual navigation. - params->target_contents->controller().LoadURL(url, params->referrer, - params->transition); + // Try to handle non-navigational URLs that popup dialogs and such, these + // should not actually navigate. + if (!HandleNonNavigationAboutURL(url)) { + // Perform the actual navigation. + params->target_contents->controller().LoadURL(url, params->referrer, + params->transition); + } } else { // |target_contents| was specified non-NULL, and so we assume it has already // been navigated appropriately. We need to do nothing more other than diff --git a/chrome/common/url_constants.cc b/chrome/common/url_constants.cc index 9b9dd6e..05e74ab 100644 --- a/chrome/common/url_constants.cc +++ b/chrome/common/url_constants.cc @@ -38,6 +38,7 @@ const char kAboutGpuCrashURL[] = "about:gpucrash"; const char kAboutGpuHangURL[] = "about:gpuhang"; const char kAboutHangURL[] = "about:hang"; const char kAboutHistogramsURL[] = "about:histograms"; +const char kAboutIPCURL[] = "about:ipc"; const char kAboutMemoryURL[] = "about:memory"; const char kAboutNetInternalsURL[] = "about:net-internals"; const char kAboutPluginsURL[] = "about:plugins"; @@ -68,7 +69,6 @@ const char kChromeUIFlagsURL[] = "chrome://flags/"; const char kChromeUIFlashURL[] = "chrome://flash/"; const char kChromeUIHistory2URL[] = "chrome://history2/"; const char kChromeUIHistoryURL[] = "chrome://history/"; -const char kChromeUIIPCURL[] = "chrome://about/ipc/"; const char kChromeUIKeyboardURL[] = "chrome://keyboard/"; const char kChromeUINewTabURL[] = "chrome://newtab/"; const char kChromeUIPluginsURL[] = "chrome://plugins/"; diff --git a/chrome/common/url_constants.h b/chrome/common/url_constants.h index 0eff7b9..45f3da9 100644 --- a/chrome/common/url_constants.h +++ b/chrome/common/url_constants.h @@ -32,6 +32,7 @@ extern const char kAboutGpuCrashURL[]; extern const char kAboutGpuHangURL[]; extern const char kAboutHangURL[]; extern const char kAboutHistogramsURL[]; +extern const char kAboutIPCURL[]; extern const char kAboutMemoryURL[]; extern const char kAboutNetInternalsURL[]; extern const char kAboutPluginsURL[]; @@ -60,7 +61,6 @@ extern const char kChromeUIFlashURL[]; extern const char kChromeUIFaviconURL[]; extern const char kChromeUIHistory2URL[]; extern const char kChromeUIHistoryURL[]; -extern const char kChromeUIIPCURL[]; extern const char kChromeUIKeyboardURL[]; extern const char kChromeUINewTabURL[]; extern const char kChromeUIPluginsURL[]; diff --git a/content/browser/DEPS b/content/browser/DEPS index 3210564..0d07b79 100644 --- a/content/browser/DEPS +++ b/content/browser/DEPS @@ -6,8 +6,6 @@ include_rules = [ "+chrome/browser/accessibility/browser_accessibility_state.h",
- "+chrome/browser/browser_about_handler.h",
-
"+chrome/browser/browser_process.h",
"+chrome/browser/browser_shutdown.h",
diff --git a/content/browser/tab_contents/navigation_controller.cc b/content/browser/tab_contents/navigation_controller.cc index 324d6e0..0c32761 100644 --- a/content/browser/tab_contents/navigation_controller.cc +++ b/content/browser/tab_contents/navigation_controller.cc @@ -9,7 +9,6 @@ #include "base/string_util.h" #include "base/time.h" #include "base/utf_string_conversions.h" -#include "chrome/browser/browser_about_handler.h" #include "chrome/browser/browser_url_handler.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/sessions/session_types.h" @@ -268,13 +267,6 @@ void NavigationController::LoadEntry(NavigationEntry* entry) { return; } - // Handle non-navigational URLs that popup dialogs and such, these should not - // actually navigate. - if (HandleNonNavigationAboutURL(entry->url())) { - delete entry; - return; - } - // When navigating to a new page, we don't know for sure if we will actually // end up leaving the current page. The new page load could for example // result in a download or a 'no content' response (e.g., a mailto: URL). |