summaryrefslogtreecommitdiffstats
path: root/chrome/browser/browser_about_handler.cc
diff options
context:
space:
mode:
authorblundell@chromium.org <blundell@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-06-12 14:29:02 +0000
committerblundell@chromium.org <blundell@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-06-12 14:29:02 +0000
commit9b5b1d60209fd342960797723e9ad108d49e6cad (patch)
tree032759d7e9c9f1ab207d6c28308b1c788416e69b /chrome/browser/browser_about_handler.cc
parent820fb1ed762a001b82ecc227f24d6dbde8ea6b17 (diff)
downloadchromium_src-9b5b1d60209fd342960797723e9ad108d49e6cad.zip
chromium_src-9b5b1d60209fd342960797723e9ad108d49e6cad.tar.gz
chromium_src-9b5b1d60209fd342960797723e9ad108d49e6cad.tar.bz2
Componentize URLFixerUpper.
This CL moves URLFixerUpper into a new url_fixer component to allow this code to be shared by the iOS port. At the present time the component contains some minor Chrome-specific logic. Specifically, it rewrites about:// to chrome:// and uses about:// version as the default about:// host. We decided not to abstract this logic at this time, as the only embedders wishing to use this component are ports of Chrome. However, if there comes to be a non-Chrome embedder that wishes to use this component, this behavior could easily be generalized (e.g., by exposing the variables that are used for these purposes in the header file to allow the embedder to customize them). BUG=373229 R=jam@chromium.org TBR=mmenke NOTREECHECKS=true Review URL: https://codereview.chromium.org/320253004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@276672 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser_about_handler.cc')
-rw-r--r--chrome/browser/browser_about_handler.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/chrome/browser/browser_about_handler.cc b/chrome/browser/browser_about_handler.cc
index e32973a..7878b25 100644
--- a/chrome/browser/browser_about_handler.cc
+++ b/chrome/browser/browser_about_handler.cc
@@ -10,20 +10,20 @@
#include "base/strings/string_util.h"
#include "chrome/browser/lifetime/application_lifetime.h"
#include "chrome/browser/ui/browser_dialogs.h"
-#include "chrome/common/net/url_fixer_upper.h"
#include "chrome/common/url_constants.h"
+#include "components/url_fixer/url_fixer.h"
bool WillHandleBrowserAboutURL(GURL* url,
content::BrowserContext* browser_context) {
// TODO(msw): Eliminate "about:*" constants and literals from code and tests,
// then hopefully we can remove this forced fixup.
- *url = URLFixerUpper::FixupURL(url->possibly_invalid_spec(), std::string());
+ *url = url_fixer::FixupURL(url->possibly_invalid_spec(), std::string());
- // Check that about: URLs are fixed up to chrome: by URLFixerUpper::FixupURL.
+ // Check that about: URLs are fixed up to chrome: by url_fixer::FixupURL.
DCHECK((*url == GURL(url::kAboutBlankURL)) ||
!url->SchemeIs(url::kAboutScheme));
- // Only handle chrome://foo/, URLFixerUpper::FixupURL translates about:foo.
+ // Only handle chrome://foo/, url_fixer::FixupURL translates about:foo.
if (!url->SchemeIs(content::kChromeUIScheme))
return false;