Commit 6aad4bd9 authored by nsylvain@chromium.org's avatar nsylvain@chromium.org

Revert brett's code, for real this time.

Review URL: http://codereview.chromium.org/28224

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10517 0039d316-1c4b-4281-b951-d872f2087c98
parent 2ce95ef0
// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "chrome/common/url_constants.h" #include "chrome/common/url_constants.h"
namespace chrome { namespace chrome {
const char kAboutScheme[] = "about"; const char kAboutScheme[] = "about";
const char kChromeInternalScheme[] = "chrome-internal"; const char kChromeInternalScheme[] = "chrome-internal";
const char kChromeUIScheme[] = "chrome-ui"; const char kChromeUIScheme[] = "chrome-ui";
const char kDataScheme[] = "data"; const char kDataScheme[] = "data";
const char kExtensionScheme[] = "chrome-extension"; const char kExtensionScheme[] = "chrome-extension";
const char kFileScheme[] = "file"; const char kFileScheme[] = "file";
const char kFtpScheme[] = "ftp"; const char kFtpScheme[] = "ftp";
const char kHttpScheme[] = "http"; const char kHttpScheme[] = "http";
const char kHttpsScheme[] = "https"; const char kHttpsScheme[] = "https";
const char kJavaScriptScheme[] = "javascript"; const char kJavaScriptScheme[] = "javascript";
const char kMailToScheme[] = "mailto"; const char kMailToScheme[] = "mailto";
const char kUserScriptScheme[] = "chrome-user-script"; const char kUserScriptScheme[] = "chrome-user-script";
const char kViewSourceScheme[] = "view-source"; const char kViewSourceScheme[] = "view-source";
const char kStandardSchemeSeparator[] = "://"; const char kStandardSchemeSeparator[] = "://";
const char kAboutBlankURL[] = "about:blank"; const char kAboutBlankURL[] = "about:blank";
const char kAboutCacheURL[] = "about:cache";
const char kAboutCrashURL[] = "about:crash"; } // namespace chrome
const char kAboutHangURL[] = "about:hang";
const char kAboutMemoryURL[] = "about:memory";
const char kAboutShortHangURL[] = "about:shorthang";
} // namespace chrome
...@@ -29,11 +29,6 @@ extern const char kStandardSchemeSeparator[]; ...@@ -29,11 +29,6 @@ extern const char kStandardSchemeSeparator[];
// About URLs (including schmes). // About URLs (including schmes).
extern const char kAboutBlankURL[]; extern const char kAboutBlankURL[];
extern const char kAboutCacheURL[];
extern const char kAboutCrashURL[];
extern const char kAboutHangURL[];
extern const char kAboutMemoryURL[];
extern const char kAboutShortHangURL[];
} // namespace chrome } // namespace chrome
......
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
#include "chrome/renderer/about_handler.h" #include "chrome/renderer/about_handler.h"
#include "base/platform_thread.h" #include "base/platform_thread.h"
#include "chrome/common/url_constants.h"
#include "googleurl/src/gurl.h" #include "googleurl/src/gurl.h"
struct AboutHandlerUrl { struct AboutHandlerUrl {
...@@ -14,14 +13,14 @@ struct AboutHandlerUrl { ...@@ -14,14 +13,14 @@ struct AboutHandlerUrl {
}; };
static AboutHandlerUrl about_urls[] = { static AboutHandlerUrl about_urls[] = {
{ chrome::kAboutCrashURL, AboutHandler::AboutCrash }, { "about:crash", AboutHandler::AboutCrash },
{ chrome::kAboutHangURL, AboutHandler::AboutHang }, { "about:hang", AboutHandler::AboutHang },
{ chrome::kAboutShortHangURL, AboutHandler::AboutShortHang }, { "about:shorthang", AboutHandler::AboutShortHang },
{ NULL, NULL } { NULL, NULL }
}; };
bool AboutHandler::WillHandle(const GURL& url) { bool AboutHandler::WillHandle(const GURL& url) {
if (url.SchemeIs(chrome::kAboutScheme)) if (url.scheme() != "about")
return false; return false;
struct AboutHandlerUrl* url_handler = about_urls; struct AboutHandlerUrl* url_handler = about_urls;
...@@ -35,7 +34,7 @@ bool AboutHandler::WillHandle(const GURL& url) { ...@@ -35,7 +34,7 @@ bool AboutHandler::WillHandle(const GURL& url) {
// static // static
bool AboutHandler::MaybeHandle(const GURL& url) { bool AboutHandler::MaybeHandle(const GURL& url) {
if (!url.SchemeIs(chrome::kAboutScheme)) if (url.scheme() != "about")
return false; return false;
struct AboutHandlerUrl* url_handler = about_urls; struct AboutHandlerUrl* url_handler = about_urls;
......
...@@ -1607,7 +1607,7 @@ WindowOpenDisposition RenderView::DispositionForNavigationAction( ...@@ -1607,7 +1607,7 @@ WindowOpenDisposition RenderView::DispositionForNavigationAction(
// JavaScript. // JavaScript.
bool is_fork = bool is_fork =
// Must start from a tab showing about:blank, which is later redirected. // Must start from a tab showing about:blank, which is later redirected.
frame->GetURL() == GURL(chrome::kAboutBlankURL) && frame->GetURL() == GURL("about:blank") &&
// Must be the first real navigation of the tab. // Must be the first real navigation of the tab.
GetHistoryBackListCount() < 1 && GetHistoryBackListCount() < 1 &&
GetHistoryForwardListCount() < 1 && GetHistoryForwardListCount() < 1 &&
......
...@@ -18,7 +18,6 @@ ...@@ -18,7 +18,6 @@
#include "chrome/common/chrome_paths.h" #include "chrome/common/chrome_paths.h"
#include "chrome/common/env_vars.h" #include "chrome/common/env_vars.h"
#include "chrome/common/libxml_utils.h" #include "chrome/common/libxml_utils.h"
#include "chrome/common/url_constants.h"
#include "chrome/common/win_util.h" #include "chrome/common/win_util.h"
#include "chrome/test/automated_ui_tests/automated_ui_tests.h" #include "chrome/test/automated_ui_tests/automated_ui_tests.h"
#include "chrome/test/automation/browser_proxy.h" #include "chrome/test/automation/browser_proxy.h"
...@@ -739,7 +738,7 @@ bool AutomatedUITest::ForceCrash() { ...@@ -739,7 +738,7 @@ bool AutomatedUITest::ForceCrash() {
return false; return false;
} }
scoped_ptr<TabProxy> tab(browser->GetActiveTab()); scoped_ptr<TabProxy> tab(browser->GetActiveTab());
GURL test_url(chrome::kAboutCrashURL); GURL test_url("about:crash");
bool did_timeout; bool did_timeout;
tab->NavigateToURLWithTimeout(test_url, kDebuggingTimeoutMsec, &did_timeout); tab->NavigateToURLWithTimeout(test_url, kDebuggingTimeoutMsec, &did_timeout);
if (!did_timeout) { if (!did_timeout) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment