diff options
author | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-15 03:27:18 +0000 |
---|---|---|
committer | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-15 03:27:18 +0000 |
commit | 8c6bcd867c7ed3729cc25017b5d7c802fbd56ffb (patch) | |
tree | ffd5dae588760f430ce7e6941e8fde62987e9ebe | |
parent | 56314f7ec1fbbe0ca00ef8dadc0bcdc39ea2ef1d (diff) | |
download | chromium_src-8c6bcd867c7ed3729cc25017b5d7c802fbd56ffb.zip chromium_src-8c6bcd867c7ed3729cc25017b5d7c802fbd56ffb.tar.gz chromium_src-8c6bcd867c7ed3729cc25017b5d7c802fbd56ffb.tar.bz2 |
net: Add namespace net to URLRequestErrorJob.
BUG=64263
TEST=compiled locally and trybots
Review URL: http://codereview.chromium.org/5863001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69228 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/chrome_plugin_host.cc | 2 | ||||
-rw-r--r-- | chrome/browser/extensions/extension_protocols.cc | 2 | ||||
-rw-r--r-- | net/url_request/url_request_error_job.cc | 8 | ||||
-rw-r--r-- | net/url_request/url_request_error_job.h | 8 | ||||
-rw-r--r-- | net/url_request/url_request_job_manager.cc | 6 | ||||
-rw-r--r-- | webkit/appcache/appcache_request_handler_unittest.cc | 3 | ||||
-rw-r--r-- | webkit/appcache/appcache_update_job_unittest.cc | 2 | ||||
-rw-r--r-- | webkit/appcache/appcache_url_request_job_unittest.cc | 3 |
8 files changed, 22 insertions, 12 deletions
diff --git a/chrome/browser/chrome_plugin_host.cc b/chrome/browser/chrome_plugin_host.cc index b339b46..50b8d88 100644 --- a/chrome/browser/chrome_plugin_host.cc +++ b/chrome/browser/chrome_plugin_host.cc @@ -61,7 +61,7 @@ class PluginRequestInterceptor // This will get called if a plugin failed to intercept a request for a // protocol it has registered. In that case, we return NULL and the request // will result in an error. - return new URLRequestErrorJob(request, net::ERR_FILE_NOT_FOUND); + return new net::URLRequestErrorJob(request, net::ERR_FILE_NOT_FOUND); } explicit PluginRequestInterceptor(ChromePluginLib* plugin) diff --git a/chrome/browser/extensions/extension_protocols.cc b/chrome/browser/extensions/extension_protocols.cc index 2baf3f1..e95f18d 100644 --- a/chrome/browser/extensions/extension_protocols.cc +++ b/chrome/browser/extensions/extension_protocols.cc @@ -152,7 +152,7 @@ static net::URLRequestJob* CreateExtensionURLRequestJob( // TODO(mpcomplete): better error code. if (!AllowExtensionResourceLoad(request, context, scheme)) - return new URLRequestErrorJob(request, net::ERR_ADDRESS_UNREACHABLE); + return new net::URLRequestErrorJob(request, net::ERR_ADDRESS_UNREACHABLE); // chrome-extension://extension-id/resource/path.js const std::string& extension_id = request->url().host(); diff --git a/net/url_request/url_request_error_job.cc b/net/url_request/url_request_error_job.cc index c8f350b..c69e3f5 100644 --- a/net/url_request/url_request_error_job.cc +++ b/net/url_request/url_request_error_job.cc @@ -8,8 +8,10 @@ #include "net/base/net_errors.h" #include "net/url_request/url_request_status.h" -URLRequestErrorJob::URLRequestErrorJob(net::URLRequest* request, int error) - : net::URLRequestJob(request), error_(error) { +namespace net { + +URLRequestErrorJob::URLRequestErrorJob(URLRequest* request, int error) + : URLRequestJob(request), error_(error) { } void URLRequestErrorJob::Start() { @@ -20,3 +22,5 @@ void URLRequestErrorJob::Start() { void URLRequestErrorJob::StartAsync() { NotifyStartError(URLRequestStatus(URLRequestStatus::FAILED, error_)); } + +} // namespace net diff --git a/net/url_request/url_request_error_job.h b/net/url_request/url_request_error_job.h index 58729c8..9d3ba7b 100644 --- a/net/url_request/url_request_error_job.h +++ b/net/url_request/url_request_error_job.h @@ -11,9 +11,11 @@ #include "net/url_request/url_request_job.h" -class URLRequestErrorJob : public net::URLRequestJob { +namespace net { + +class URLRequestErrorJob : public URLRequestJob { public: - URLRequestErrorJob(net::URLRequest* request, int error); + URLRequestErrorJob(URLRequest* request, int error); virtual void Start(); @@ -25,4 +27,6 @@ class URLRequestErrorJob : public net::URLRequestJob { int error_; }; +} // namespace net + #endif // NET_URL_REQUEST_URL_REQUEST_ERROR_JOB_H_ diff --git a/net/url_request/url_request_job_manager.cc b/net/url_request/url_request_job_manager.cc index 2000832..45d1f82 100644 --- a/net/url_request/url_request_job_manager.cc +++ b/net/url_request/url_request_job_manager.cc @@ -59,12 +59,12 @@ net::URLRequestJob* URLRequestJobManager::CreateJob( // If we are given an invalid URL, then don't even try to inspect the scheme. if (!request->url().is_valid()) - return new URLRequestErrorJob(request, net::ERR_INVALID_URL); + return new net::URLRequestErrorJob(request, net::ERR_INVALID_URL); // We do this here to avoid asking interceptors about unsupported schemes. const std::string& scheme = request->url().scheme(); // already lowercase if (!SupportsScheme(scheme)) - return new URLRequestErrorJob(request, net::ERR_UNKNOWN_URL_SCHEME); + return new net::URLRequestErrorJob(request, net::ERR_UNKNOWN_URL_SCHEME); // THREAD-SAFETY NOTICE: // We do not need to acquire the lock here since we are only reading our @@ -103,7 +103,7 @@ net::URLRequestJob* URLRequestJobManager::CreateJob( // wasn't interested in handling the URL. That is fairly unexpected, and we // don't know have a specific error to report here :-( LOG(WARNING) << "Failed to map: " << request->url().spec(); - return new URLRequestErrorJob(request, net::ERR_FAILED); + return new net::URLRequestErrorJob(request, net::ERR_FAILED); } net::URLRequestJob* URLRequestJobManager::MaybeInterceptRedirect( diff --git a/webkit/appcache/appcache_request_handler_unittest.cc b/webkit/appcache/appcache_request_handler_unittest.cc index 6f69ae9..1ffbb6f 100644 --- a/webkit/appcache/appcache_request_handler_unittest.cc +++ b/webkit/appcache/appcache_request_handler_unittest.cc @@ -103,7 +103,8 @@ class AppCacheRequestHandlerTest : public testing::Test { } else { // Some of these tests trigger UpdateJobs which start URLRequests. // We short circuit those be returning error jobs. - return new URLRequestErrorJob(request, net::ERR_INTERNET_DISCONNECTED); + return new net::URLRequestErrorJob(request, + net::ERR_INTERNET_DISCONNECTED); } } diff --git a/webkit/appcache/appcache_update_job_unittest.cc b/webkit/appcache/appcache_update_job_unittest.cc index f4aacf2..0c34cb6 100644 --- a/webkit/appcache/appcache_update_job_unittest.cc +++ b/webkit/appcache/appcache_update_job_unittest.cc @@ -44,7 +44,7 @@ class MockHttpServer { static net::URLRequestJob* JobFactory(net::URLRequest* request, const std::string& scheme) { if (request->url().host() != "mockhost") - return new URLRequestErrorJob(request, -1); + return new net::URLRequestErrorJob(request, -1); std::string headers, body; GetMockResponse(request->url().path(), &headers, &body); diff --git a/webkit/appcache/appcache_url_request_job_unittest.cc b/webkit/appcache/appcache_url_request_job_unittest.cc index a282b42..141b909 100644 --- a/webkit/appcache/appcache_url_request_job_unittest.cc +++ b/webkit/appcache/appcache_url_request_job_unittest.cc @@ -131,7 +131,8 @@ class AppCacheURLRequestJobTest : public testing::Test { mock_factory_job_ = NULL; return temp; } else { - return new URLRequestErrorJob(request, net::ERR_INTERNET_DISCONNECTED); + return new net::URLRequestErrorJob(request, + net::ERR_INTERNET_DISCONNECTED); } } |