summaryrefslogtreecommitdiffstats
path: root/content/browser/browser_url_handler_impl.cc
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-30 03:22:20 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-30 03:22:20 +0000
commit464883218eccabb97b52f7bcc6a459709b69f87e (patch)
tree20e62a5781a44d6827019d61d075e264e87b0469 /content/browser/browser_url_handler_impl.cc
parent3df72a134583efcc1e86c6abac2103c9800c5c13 (diff)
downloadchromium_src-464883218eccabb97b52f7bcc6a459709b69f87e.zip
chromium_src-464883218eccabb97b52f7bcc6a459709b69f87e.tar.gz
chromium_src-464883218eccabb97b52f7bcc6a459709b69f87e.tar.bz2
Move remaining files in content\browser to the content namespace.
Review URL: https://codereview.chromium.org/11340029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@164828 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/browser_url_handler_impl.cc')
-rw-r--r--content/browser/browser_url_handler_impl.cc18
1 files changed, 9 insertions, 9 deletions
diff --git a/content/browser/browser_url_handler_impl.cc b/content/browser/browser_url_handler_impl.cc
index 2585844..5120e3b 100644
--- a/content/browser/browser_url_handler_impl.cc
+++ b/content/browser/browser_url_handler_impl.cc
@@ -10,11 +10,11 @@
#include "content/public/common/url_constants.h"
#include "googleurl/src/gurl.h"
-using content::BrowserURLHandler;
+namespace content {
// Handles rewriting view-source URLs for what we'll actually load.
static bool HandleViewSource(GURL* url,
- content::BrowserContext* browser_context) {
+ BrowserContext* browser_context) {
if (url->SchemeIs(chrome::kViewSourceScheme)) {
// Load the inner URL instead.
*url = GURL(url->path());
@@ -46,8 +46,7 @@ static bool HandleViewSource(GURL* url,
}
// Turns a non view-source URL into the corresponding view-source URL.
-static bool ReverseViewSource(GURL* url,
- content::BrowserContext* browser_context) {
+static bool ReverseViewSource(GURL* url, BrowserContext* browser_context) {
// No action necessary if the URL is already view-source:
if (url->SchemeIs(chrome::kViewSourceScheme))
return false;
@@ -61,8 +60,7 @@ static bool ReverseViewSource(GURL* url,
return true;
}
-static bool HandleDebugUrl(GURL* url,
- content::BrowserContext* browser_context) {
+static bool HandleDebugUrl(GURL* url, BrowserContext* browser_context) {
// Circumvent processing URLs that the renderer process will handle.
return *url == GURL(chrome::kChromeUICrashURL) ||
*url == GURL(chrome::kChromeUIHangURL) ||
@@ -89,7 +87,7 @@ BrowserURLHandlerImpl* BrowserURLHandlerImpl::GetInstance() {
BrowserURLHandlerImpl::BrowserURLHandlerImpl() {
AddHandlerPair(&HandleDebugUrl, BrowserURLHandlerImpl::null_handler());
- content::GetContentClient()->browser()->BrowserURLHandlerCreated(this);
+ GetContentClient()->browser()->BrowserURLHandlerCreated(this);
// view-source:
AddHandlerPair(&HandleViewSource, &ReverseViewSource);
@@ -105,7 +103,7 @@ void BrowserURLHandlerImpl::AddHandlerPair(URLHandler handler,
void BrowserURLHandlerImpl::RewriteURLIfNecessary(
GURL* url,
- content::BrowserContext* browser_context,
+ BrowserContext* browser_context,
bool* reverse_on_redirect) {
for (size_t i = 0; i < url_handlers_.size(); ++i) {
URLHandler handler = *url_handlers_[i].first;
@@ -117,7 +115,7 @@ void BrowserURLHandlerImpl::RewriteURLIfNecessary(
}
bool BrowserURLHandlerImpl::ReverseURLRewrite(
- GURL* url, const GURL& original, content::BrowserContext* browser_context) {
+ GURL* url, const GURL& original, BrowserContext* browser_context) {
for (size_t i = 0; i < url_handlers_.size(); ++i) {
URLHandler reverse_rewriter = *url_handlers_[i].second;
if (reverse_rewriter) {
@@ -133,3 +131,5 @@ bool BrowserURLHandlerImpl::ReverseURLRewrite(
}
return false;
}
+
+} // namespace content