Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(861)

Unified Diff: content/browser/browser_url_handler_impl.cc

Issue 11273049: Revert 164120 - content/browser: Move more files into the content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/browser_url_handler_impl.h ('k') | content/browser/browser_url_handler_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/browser_url_handler_impl.cc
===================================================================
--- content/browser/browser_url_handler_impl.cc (revision 164121)
+++ content/browser/browser_url_handler_impl.cc (working copy)
@@ -10,12 +10,11 @@
#include "content/public/common/url_constants.h"
#include "googleurl/src/gurl.h"
-namespace content {
+using content::BrowserURLHandler;
-namespace {
-
// Handles rewriting view-source URLs for what we'll actually load.
-bool HandleViewSource(GURL* url, BrowserContext* browser_context) {
+static bool HandleViewSource(GURL* url,
+ content::BrowserContext* browser_context) {
if (url->SchemeIs(chrome::kViewSourceScheme)) {
// Load the inner URL instead.
*url = GURL(url->path());
@@ -47,7 +46,8 @@
}
// Turns a non view-source URL into the corresponding view-source URL.
-bool ReverseViewSource(GURL* url, BrowserContext* browser_context) {
+static bool ReverseViewSource(GURL* url,
+ content::BrowserContext* browser_context) {
// No action necessary if the URL is already view-source:
if (url->SchemeIs(chrome::kViewSourceScheme))
return false;
@@ -61,7 +61,8 @@
return true;
}
-bool HandleDebugUrl(GURL* url, BrowserContext* browser_context) {
+static bool HandleDebugUrl(GURL* url,
+ content::BrowserContext* browser_context) {
// Circumvent processing URLs that the renderer process will handle.
return *url == GURL(chrome::kChromeUICrashURL) ||
*url == GURL(chrome::kChromeUIHangURL) ||
@@ -69,8 +70,6 @@
*url == GURL(chrome::kChromeUIShorthangURL);
}
-} // namespace
-
// static
BrowserURLHandler* BrowserURLHandler::GetInstance() {
return BrowserURLHandlerImpl::GetInstance();
@@ -90,7 +89,7 @@
BrowserURLHandlerImpl::BrowserURLHandlerImpl() {
AddHandlerPair(&HandleDebugUrl, BrowserURLHandlerImpl::null_handler());
- GetContentClient()->browser()->BrowserURLHandlerCreated(this);
+ content::GetContentClient()->browser()->BrowserURLHandlerCreated(this);
// view-source:
AddHandlerPair(&HandleViewSource, &ReverseViewSource);
@@ -106,7 +105,7 @@
void BrowserURLHandlerImpl::RewriteURLIfNecessary(
GURL* url,
- BrowserContext* browser_context,
+ content::BrowserContext* browser_context,
bool* reverse_on_redirect) {
for (size_t i = 0; i < url_handlers_.size(); ++i) {
URLHandler handler = *url_handlers_[i].first;
@@ -117,9 +116,8 @@
}
}
-bool BrowserURLHandlerImpl::ReverseURLRewrite(GURL* url,
- const GURL& original,
- BrowserContext* browser_context) {
+bool BrowserURLHandlerImpl::ReverseURLRewrite(
+ GURL* url, const GURL& original, content::BrowserContext* browser_context) {
for (size_t i = 0; i < url_handlers_.size(); ++i) {
URLHandler reverse_rewriter = *url_handlers_[i].second;
if (reverse_rewriter) {
@@ -135,5 +133,3 @@
}
return false;
}
-
-} // namespace content
« no previous file with comments | « content/browser/browser_url_handler_impl.h ('k') | content/browser/browser_url_handler_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698