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

Unified Diff: net/url_request/url_request_filter.cc

Issue 5384002: net: Remove typedef net::URLRequest URLRequest; (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review Created 10 years, 1 month 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
Index: net/url_request/url_request_filter.cc
diff --git a/net/url_request/url_request_filter.cc b/net/url_request/url_request_filter.cc
index fb305b21fcafed18f7300a51a540f3f42012f00a..946c2c390157aca4ddfb49fc05855521f84393f5 100644
--- a/net/url_request/url_request_filter.cc
+++ b/net/url_request/url_request_filter.cc
@@ -27,12 +27,12 @@ net::URLRequestJob* URLRequestFilter::Factory(net::URLRequest* request,
URLRequestFilter::~URLRequestFilter() {}
void URLRequestFilter::AddHostnameHandler(const std::string& scheme,
- const std::string& hostname, URLRequest::ProtocolFactory* factory) {
+ const std::string& hostname, net::URLRequest::ProtocolFactory* factory) {
hostname_handler_map_[make_pair(scheme, hostname)] = factory;
// Register with the ProtocolFactory.
- URLRequest::RegisterProtocolFactory(scheme,
- &URLRequestFilter::Factory);
+ net::URLRequest::RegisterProtocolFactory(scheme,
+ &URLRequestFilter::Factory);
#ifndef NDEBUG
// Check to see if we're masking URLs in the url_handler_map_.
@@ -54,20 +54,22 @@ void URLRequestFilter::RemoveHostnameHandler(const std::string& scheme,
DCHECK(iter != hostname_handler_map_.end());
hostname_handler_map_.erase(iter);
- // Note that we don't unregister from the URLRequest ProtocolFactory as this
- // would left no protocol factory for the scheme. URLRequestFilter::Factory
- // will keep forwarding the requests to the URLRequestInetJob.
+ // Note that we don't unregister from the net::URLRequest ProtocolFactory as
+ // this would left no protocol factory for the scheme.
+ // URLRequestFilter::Factory will keep forwarding the requests to the
+ // URLRequestInetJob.
}
-bool URLRequestFilter::AddUrlHandler(const GURL& url,
- URLRequest::ProtocolFactory* factory) {
+bool URLRequestFilter::AddUrlHandler(
+ const GURL& url,
+ net::URLRequest::ProtocolFactory* factory) {
if (!url.is_valid())
return false;
url_handler_map_[url.spec()] = factory;
// Register with the ProtocolFactory.
- URLRequest::RegisterProtocolFactory(url.scheme(),
- &URLRequestFilter::Factory);
+ net::URLRequest::RegisterProtocolFactory(url.scheme(),
+ &URLRequestFilter::Factory);
#ifndef NDEBUG
// Check to see if this URL is masked by a hostname handler.
HostnameHandlerMap::iterator host_it =
@@ -84,9 +86,10 @@ void URLRequestFilter::RemoveUrlHandler(const GURL& url) {
DCHECK(iter != url_handler_map_.end());
url_handler_map_.erase(iter);
- // Note that we don't unregister from the URLRequest ProtocolFactory as this
- // would left no protocol factory for the scheme. URLRequestFilter::Factory
- // will keep forwarding the requests to the URLRequestInetJob.
+ // Note that we don't unregister from the net::URLRequest ProtocolFactory as
+ // this would left no protocol factory for the scheme.
+ // URLRequestFilter::Factory will keep forwarding the requests to the
+ // URLRequestInetJob.
}
void URLRequestFilter::ClearHandlers() {
@@ -102,7 +105,7 @@ void URLRequestFilter::ClearHandlers() {
}
for (std::set<std::string>::const_iterator scheme = schemes.begin();
scheme != schemes.end(); ++scheme) {
- URLRequest::RegisterProtocolFactory(*scheme, NULL);
+ net::URLRequest::RegisterProtocolFactory(*scheme, NULL);
}
url_handler_map_.clear();

Powered by Google App Engine
This is Rietveld 408576698