diff options
author | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-13 02:12:44 +0000 |
---|---|---|
committer | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-13 02:12:44 +0000 |
commit | f90bf0d9264f7f272b7f4a65f864cb7170417fe8 (patch) | |
tree | 3df23eb7b118bfd40c7601df6245d869b56ced49 /webkit | |
parent | 56d8cf25ee047078688c8af5917fcfbc63ac749b (diff) | |
download | chromium_src-f90bf0d9264f7f272b7f4a65f864cb7170417fe8.zip chromium_src-f90bf0d9264f7f272b7f4a65f864cb7170417fe8.tar.gz chromium_src-f90bf0d9264f7f272b7f4a65f864cb7170417fe8.tar.bz2 |
net: Remove typedef net::URLRequestStatus URLRequestStatus;
BUG=64263
TEST=compiled locally, trybots
Review URL: http://codereview.chromium.org/6166010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71285 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r-- | webkit/appcache/appcache_request_handler.cc | 6 | ||||
-rw-r--r-- | webkit/appcache/appcache_url_request_job.cc | 14 | ||||
-rw-r--r-- | webkit/appcache/appcache_url_request_job_unittest.cc | 4 | ||||
-rw-r--r-- | webkit/blob/blob_url_request_job.cc | 9 | ||||
-rw-r--r-- | webkit/glue/resource_loader_bridge.h | 4 | ||||
-rw-r--r-- | webkit/glue/weburlloader_impl.cc | 32 | ||||
-rw-r--r-- | webkit/tools/test_shell/simple_resource_loader_bridge.cc | 8 |
7 files changed, 40 insertions, 37 deletions
diff --git a/webkit/appcache/appcache_request_handler.cc b/webkit/appcache/appcache_request_handler.cc index 72e6beb..a514517 100644 --- a/webkit/appcache/appcache_request_handler.cc +++ b/webkit/appcache/appcache_request_handler.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -121,8 +121,8 @@ AppCacheURLRequestJob* AppCacheRequestHandler::MaybeLoadFallbackForResponse( if (!found_fallback_entry_.has_response_id()) return NULL; - if (request->status().status() == URLRequestStatus::CANCELED || - request->status().status() == URLRequestStatus::HANDLED_EXTERNALLY) { + if (request->status().status() == net::URLRequestStatus::CANCELED || + request->status().status() == net::URLRequestStatus::HANDLED_EXTERNALLY) { // 6.9.6, step 4: But not if the user canceled the download. return NULL; } diff --git a/webkit/appcache/appcache_url_request_job.cc b/webkit/appcache/appcache_url_request_job.cc index 10245f7..205458f 100644 --- a/webkit/appcache/appcache_url_request_job.cc +++ b/webkit/appcache/appcache_url_request_job.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -94,8 +94,8 @@ void AppCacheURLRequestJob::BeginDelivery() { case ERROR_DELIVERY: request()->net_log().AddEvent( net::NetLog::TYPE_APPCACHE_DELIVERING_ERROR_RESPONSE, NULL); - NotifyStartError( - URLRequestStatus(URLRequestStatus::FAILED, net::ERR_FAILED)); + NotifyStartError(net::URLRequestStatus(net::URLRequestStatus::FAILED, + net::ERR_FAILED)); break; case APPCACHED_DELIVERY: @@ -188,11 +188,11 @@ void AppCacheURLRequestJob::SetupRangeResponse() { void AppCacheURLRequestJob::OnReadComplete(int result) { DCHECK(is_delivering_appcache_response()); if (result == 0) - NotifyDone(URLRequestStatus()); + NotifyDone(net::URLRequestStatus()); else if (result < 0) - NotifyDone(URLRequestStatus(URLRequestStatus::FAILED, result)); + NotifyDone(net::URLRequestStatus(net::URLRequestStatus::FAILED, result)); else - SetStatus(URLRequestStatus()); // Clear the IO_PENDING status + SetStatus(net::URLRequestStatus()); // Clear the IO_PENDING status NotifyReadComplete(result); } @@ -267,7 +267,7 @@ bool AppCacheURLRequestJob::ReadRawData(net::IOBuffer* buf, int buf_size, DCHECK(bytes_read); DCHECK(!reader_->IsReadPending()); reader_->ReadData(buf, buf_size, &read_callback_); - SetStatus(URLRequestStatus(URLRequestStatus::IO_PENDING, 0)); + SetStatus(net::URLRequestStatus(net::URLRequestStatus::IO_PENDING, 0)); return false; } diff --git a/webkit/appcache/appcache_url_request_job_unittest.cc b/webkit/appcache/appcache_url_request_job_unittest.cc index a83fd10b..e1772c3 100644 --- a/webkit/appcache/appcache_url_request_job_unittest.cc +++ b/webkit/appcache/appcache_url_request_job_unittest.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -711,7 +711,7 @@ class AppCacheURLRequestJobTest : public testing::Test { } void VerifyCancel() { - EXPECT_EQ(URLRequestStatus::CANCELED, + EXPECT_EQ(net::URLRequestStatus::CANCELED, request_->status().status()); TestFinished(); } diff --git a/webkit/blob/blob_url_request_job.cc b/webkit/blob/blob_url_request_job.cc index 4fb5611..9f78e66 100644 --- a/webkit/blob/blob_url_request_job.cc +++ b/webkit/blob/blob_url_request_job.cc @@ -1,4 +1,4 @@ -// Copyright (c) 20010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -337,7 +337,7 @@ bool BlobURLRequestJob::ReadFile(const BlobData::Item& item, // If I/O pending error is returned, we just need to wait. if (rv == net::ERR_IO_PENDING) { - SetStatus(URLRequestStatus(URLRequestStatus::IO_PENDING, 0)); + SetStatus(net::URLRequestStatus(net::URLRequestStatus::IO_PENDING, 0)); return false; } @@ -357,7 +357,7 @@ void BlobURLRequestJob::DidRead(int result) { NotifyFailure(net::ERR_FAILED); return; } - SetStatus(URLRequestStatus()); // Clear the IO_PENDING status + SetStatus(net::URLRequestStatus()); // Clear the IO_PENDING status AdvanceBytesRead(result); @@ -466,7 +466,8 @@ void BlobURLRequestJob::NotifyFailure(int error_code) { // If we already return the headers on success, we can't change the headers // now. Instead, we just error out. if (headers_set_) { - NotifyDone(URLRequestStatus(URLRequestStatus::FAILED, error_code)); + NotifyDone(net::URLRequestStatus(net::URLRequestStatus::FAILED, + error_code)); return; } diff --git a/webkit/glue/resource_loader_bridge.h b/webkit/glue/resource_loader_bridge.h index 85facfa..23ebb35 100644 --- a/webkit/glue/resource_loader_bridge.h +++ b/webkit/glue/resource_loader_bridge.h @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // @@ -248,7 +248,7 @@ class ResourceLoaderBridge { ~SyncLoadResponse(); // The response status. - URLRequestStatus status; + net::URLRequestStatus status; // The final URL of the response. This may differ from the request URL in // the case of a server redirect. diff --git a/webkit/glue/weburlloader_impl.cc b/webkit/glue/weburlloader_impl.cc index 0372567..a99e6be 100644 --- a/webkit/glue/weburlloader_impl.cc +++ b/webkit/glue/weburlloader_impl.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -146,11 +146,12 @@ ResourceType::Type FromTargetType(WebURLRequest::TargetType type) { // Extracts the information from a data: url. bool GetInfoFromDataURL(const GURL& url, ResourceResponseInfo* info, - std::string* data, URLRequestStatus* status) { + std::string* data, + net::URLRequestStatus* status) { std::string mime_type; std::string charset; if (net::DataURL::Parse(url, &mime_type, &charset, data)) { - *status = URLRequestStatus(URLRequestStatus::SUCCESS, 0); + *status = net::URLRequestStatus(net::URLRequestStatus::SUCCESS, 0); info->request_time = Time::Now(); info->response_time = Time::Now(); info->headers = NULL; @@ -162,7 +163,8 @@ bool GetInfoFromDataURL(const GURL& url, return true; } - *status = URLRequestStatus(URLRequestStatus::FAILED, net::ERR_INVALID_URL); + *status = net::URLRequestStatus(net::URLRequestStatus::FAILED, + net::ERR_INVALID_URL); return false; } @@ -294,10 +296,9 @@ class WebURLLoaderImpl::Context : public base::RefCounted<Context>, virtual void OnDownloadedData(int len); virtual void OnReceivedData(const char* data, int len); virtual void OnReceivedCachedMetadata(const char* data, int len); - virtual void OnCompletedRequest( - const URLRequestStatus& status, - const std::string& security_info, - const base::Time& completion_time); + virtual void OnCompletedRequest(const net::URLRequestStatus& status, + const std::string& security_info, + const base::Time& completion_time); private: friend class base::RefCounted<Context>; @@ -621,7 +622,7 @@ void WebURLLoaderImpl::Context::OnReceivedCachedMetadata( } void WebURLLoaderImpl::Context::OnCompletedRequest( - const URLRequestStatus& status, + const net::URLRequestStatus& status, const std::string& security_info, const base::Time& completion_time) { if (ftp_listing_delegate_.get()) { @@ -638,9 +639,9 @@ void WebURLLoaderImpl::Context::OnCompletedRequest( completed_bridge_.swap(bridge_); if (client_) { - if (status.status() != URLRequestStatus::SUCCESS) { + if (status.status() != net::URLRequestStatus::SUCCESS) { int error_code; - if (status.status() == URLRequestStatus::HANDLED_EXTERNALLY) { + if (status.status() == net::URLRequestStatus::HANDLED_EXTERNALLY) { // By marking this request as aborted we insure that we don't navigate // to an error page. error_code = net::ERR_ABORTED; @@ -691,7 +692,7 @@ bool WebURLLoaderImpl::Context::CanHandleDataURL(const GURL& url) const { void WebURLLoaderImpl::Context::HandleDataURL() { ResourceResponseInfo info; - URLRequestStatus status; + net::URLRequestStatus status; std::string data; if (GetInfoFromDataURL(request_.url(), &info, &data, &status)) { @@ -724,9 +725,10 @@ void WebURLLoaderImpl::loadSynchronously(const WebURLRequest& request, // TODO(tc): For file loads, we may want to include a more descriptive // status code or status text. - const URLRequestStatus::Status& status = sync_load_response.status.status(); - if (status != URLRequestStatus::SUCCESS && - status != URLRequestStatus::HANDLED_EXTERNALLY) { + const net::URLRequestStatus::Status& status = + sync_load_response.status.status(); + if (status != net::URLRequestStatus::SUCCESS && + status != net::URLRequestStatus::HANDLED_EXTERNALLY) { response.setURL(final_url); error.domain = WebString::fromUTF8(net::kErrorDomain); error.reason = sync_load_response.status.os_error(); diff --git a/webkit/tools/test_shell/simple_resource_loader_bridge.cc b/webkit/tools/test_shell/simple_resource_loader_bridge.cc index e0348ff..f2c4658 100644 --- a/webkit/tools/test_shell/simple_resource_loader_bridge.cc +++ b/webkit/tools/test_shell/simple_resource_loader_bridge.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // @@ -291,7 +291,7 @@ class RequestProxy : public net::URLRequest::Delegate, peer_->OnDownloadedData(bytes_read); } - void NotifyCompletedRequest(const URLRequestStatus& status, + void NotifyCompletedRequest(const net::URLRequestStatus& status, const std::string& security_info, const base::Time& complete_time) { if (peer_) { @@ -423,7 +423,7 @@ class RequestProxy : public net::URLRequest::Delegate, this, &RequestProxy::NotifyReceivedData, bytes_read)); } - virtual void OnCompletedRequest(const URLRequestStatus& status, + virtual void OnCompletedRequest(const net::URLRequestStatus& status, const std::string& security_info, const base::Time& complete_time) { if (download_to_file_) @@ -611,7 +611,7 @@ class SyncRequestProxy : public RequestProxy { AsyncReadData(); // read more (may recurse) } - virtual void OnCompletedRequest(const URLRequestStatus& status, + virtual void OnCompletedRequest(const net::URLRequestStatus& status, const std::string& security_info, const base::Time& complete_time) { if (download_to_file_) |