diff options
author | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-30 21:34:02 +0000 |
---|---|---|
committer | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-30 21:34:02 +0000 |
commit | 6981d96328621a75557dbf843c5aab83bf4f55a3 (patch) | |
tree | 8a95daea7aad9b8bce1ced62fda4068ed296125a /chrome/browser/renderer_host | |
parent | d4e04a67c7f529bc8137c2dc5618e5a8c2123a13 (diff) | |
download | chromium_src-6981d96328621a75557dbf843c5aab83bf4f55a3.zip chromium_src-6981d96328621a75557dbf843c5aab83bf4f55a3.tar.gz chromium_src-6981d96328621a75557dbf843c5aab83bf4f55a3.tar.bz2 |
net: Remove typedef net::URLRequest URLRequest;
BUG=64263
TEST=compiled locally, trybots
Review URL: http://codereview.chromium.org/5384002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@67762 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/renderer_host')
21 files changed, 141 insertions, 137 deletions
diff --git a/chrome/browser/renderer_host/async_resource_handler.cc b/chrome/browser/renderer_host/async_resource_handler.cc index 70dfc74..3458f7c 100644 --- a/chrome/browser/renderer_host/async_resource_handler.cc +++ b/chrome/browser/renderer_host/async_resource_handler.cc @@ -102,7 +102,7 @@ bool AsyncResourceHandler::OnRequestRedirected(int request_id, ResourceResponse* response, bool* defer) { *defer = true; - URLRequest* request = rdh_->GetURLRequest( + net::URLRequest* request = rdh_->GetURLRequest( GlobalRequestID(process_id_, request_id)); LoadTimingObserver::PopulateTimingInfo(request, response); DevToolsNetLogObserver::PopulateResponseInfo(request, response); @@ -117,7 +117,7 @@ bool AsyncResourceHandler::OnResponseStarted(int request_id, // renderer will be able to set these precisely at the time the // request commits, avoiding the possibility of e.g. zooming the old content // or of having to layout the new content twice. - URLRequest* request = rdh_->GetURLRequest( + net::URLRequest* request = rdh_->GetURLRequest( GlobalRequestID(process_id_, request_id)); LoadTimingObserver::PopulateTimingInfo(request, response); diff --git a/chrome/browser/renderer_host/buffered_resource_handler.cc b/chrome/browser/renderer_host/buffered_resource_handler.cc index 0a141b0..82ca861 100644 --- a/chrome/browser/renderer_host/buffered_resource_handler.cc +++ b/chrome/browser/renderer_host/buffered_resource_handler.cc @@ -52,7 +52,7 @@ void RecordSnifferMetrics(bool sniffing_blocked, BufferedResourceHandler::BufferedResourceHandler(ResourceHandler* handler, ResourceDispatcherHost* host, - URLRequest* request) + net::URLRequest* request) : real_handler_(handler), host_(host), request_(request), diff --git a/chrome/browser/renderer_host/cross_site_resource_handler.cc b/chrome/browser/renderer_host/cross_site_resource_handler.cc index ddab0e7..2e21515 100644 --- a/chrome/browser/renderer_host/cross_site_resource_handler.cc +++ b/chrome/browser/renderer_host/cross_site_resource_handler.cc @@ -59,7 +59,7 @@ bool CrossSiteResourceHandler::OnResponseStarted(int request_id, // Look up the request and associated info. GlobalRequestID global_id(render_process_host_id_, request_id); - URLRequest* request = rdh_->GetURLRequest(global_id); + net::URLRequest* request = rdh_->GetURLRequest(global_id); if (!request) { DLOG(WARNING) << "Request wasn't found"; return false; @@ -141,7 +141,7 @@ void CrossSiteResourceHandler::ResumeResponse() { // Find the request for this response. GlobalRequestID global_id(render_process_host_id_, request_id_); - URLRequest* request = rdh_->GetURLRequest(global_id); + net::URLRequest* request = rdh_->GetURLRequest(global_id); if (!request) { DLOG(WARNING) << "Resuming a request that wasn't found"; return; @@ -189,7 +189,7 @@ void CrossSiteResourceHandler::StartCrossSiteTransition( // Store this handler on the ExtraRequestInfo, so that RDH can call our // ResumeResponse method when the close ACK is received. - URLRequest* request = rdh_->GetURLRequest(global_id); + net::URLRequest* request = rdh_->GetURLRequest(global_id); if (!request) { DLOG(WARNING) << "Cross site response for a request that wasn't found"; return; diff --git a/chrome/browser/renderer_host/download_resource_handler.cc b/chrome/browser/renderer_host/download_resource_handler.cc index 83d64f8..5de9750 100644 --- a/chrome/browser/renderer_host/download_resource_handler.cc +++ b/chrome/browser/renderer_host/download_resource_handler.cc @@ -26,7 +26,7 @@ DownloadResourceHandler::DownloadResourceHandler( int request_id, const GURL& url, DownloadFileManager* download_file_manager, - URLRequest* request, + net::URLRequest* request, bool save_as, const DownloadSaveInfo& save_info) : download_id_(-1), diff --git a/chrome/browser/renderer_host/download_throttling_resource_handler.cc b/chrome/browser/renderer_host/download_throttling_resource_handler.cc index 3c0e32b..833c8a1 100644 --- a/chrome/browser/renderer_host/download_throttling_resource_handler.cc +++ b/chrome/browser/renderer_host/download_throttling_resource_handler.cc @@ -13,7 +13,7 @@ DownloadThrottlingResourceHandler::DownloadThrottlingResourceHandler( ResourceDispatcherHost* host, - URLRequest* request, + net::URLRequest* request, const GURL& url, int render_process_host_id, int render_view_id, diff --git a/chrome/browser/renderer_host/global_request_id.h b/chrome/browser/renderer_host/global_request_id.h index eb9520b..cb87c39 100644 --- a/chrome/browser/renderer_host/global_request_id.h +++ b/chrome/browser/renderer_host/global_request_id.h @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 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. @@ -6,7 +6,7 @@ #define CHROME_BROWSER_RENDERER_HOST_GLOBAL_REQUEST_ID_H_ #pragma once -// Uniquely identifies a URLRequest. +// Uniquely identifies a net::URLRequest. struct GlobalRequestID { GlobalRequestID() : child_id(-1), request_id(-1) { } diff --git a/chrome/browser/renderer_host/offline_resource_handler.cc b/chrome/browser/renderer_host/offline_resource_handler.cc index ba94bee..362f411 100644 --- a/chrome/browser/renderer_host/offline_resource_handler.cc +++ b/chrome/browser/renderer_host/offline_resource_handler.cc @@ -23,7 +23,7 @@ OfflineResourceHandler::OfflineResourceHandler( int host_id, int route_id, ResourceDispatcherHost* rdh, - URLRequest* request) + net::URLRequest* request) : next_handler_(handler), process_host_id_(host_id), render_view_id_(route_id), diff --git a/chrome/browser/renderer_host/resource_dispatcher_host.cc b/chrome/browser/renderer_host/resource_dispatcher_host.cc index eb7e94f..64e5a5930 100644 --- a/chrome/browser/renderer_host/resource_dispatcher_host.cc +++ b/chrome/browser/renderer_host/resource_dispatcher_host.cc @@ -157,7 +157,7 @@ bool ShouldServiceRequest(ChildProcessInfo::ProcessType process_type, return true; } -void PopulateResourceResponse(URLRequest* request, +void PopulateResourceResponse(net::URLRequest* request, bool replace_extension_localization_templates, ResourceResponse* response) { response->response_head.status = request->status(); @@ -246,7 +246,7 @@ void ResourceDispatcherHost::Shutdown() { } void ResourceDispatcherHost::SetRequestInfo( - URLRequest* request, + net::URLRequest* request, ResourceDispatcherHostRequestInfo* info) { request->SetUserData(NULL, info); } @@ -285,7 +285,7 @@ bool ResourceDispatcherHost::HandleExternalProtocol(int request_id, const GURL& url, ResourceType::Type type, ResourceHandler* handler) { - if (!ResourceType::IsFrame(type) || URLRequest::IsHandledURL(url)) + if (!ResourceType::IsFrame(type) || net::URLRequest::IsHandledURL(url)) return false; BrowserThread::PostTask( @@ -430,7 +430,7 @@ void ResourceDispatcherHost::BeginRequest( } // Construct the request. - URLRequest* request = new URLRequest(request_data.url, this); + net::URLRequest* request = new net::URLRequest(request_data.url, this); request->set_method(request_data.method); request->set_first_party_for_cookies(request_data.first_party_for_cookies); request->set_referrer(CommandLine::ForCurrentProcess()->HasSwitch( @@ -707,7 +707,7 @@ void ResourceDispatcherHost::BeginDownload( // Ensure the Chrome plugins are loaded, as they may intercept network // requests. Does nothing if they are already loaded. PluginService::GetInstance()->LoadChromePlugins(this); - URLRequest* request = new URLRequest(url, this); + net::URLRequest* request = new net::URLRequest(url, this); request_id_--; @@ -727,7 +727,7 @@ void ResourceDispatcherHost::BeginDownload( ResourceType::MAIN_FRAME); } - if (!URLRequest::IsHandledURL(url)) { + if (!net::URLRequest::IsHandledURL(url)) { VLOG(1) << "Download request for unsupported protocol: " << url.possibly_invalid_spec(); return; @@ -768,7 +768,7 @@ void ResourceDispatcherHost::BeginSaveFile(const GURL& url, save_file_manager_.get())); request_id_--; - bool known_proto = URLRequest::IsHandledURL(url); + bool known_proto = net::URLRequest::IsHandledURL(url); if (!known_proto) { // Since any URLs which have non-standard scheme have been filtered // by save manager(see GURL::SchemeIsStandard). This situation @@ -777,7 +777,7 @@ void ResourceDispatcherHost::BeginSaveFile(const GURL& url, return; } - URLRequest* request = new URLRequest(url, this); + net::URLRequest* request = new net::URLRequest(url, this); request->set_method("GET"); request->set_referrer(CommandLine::ForCurrentProcess()->HasSwitch( switches::kNoReferrers) ? std::string() : referrer.spec()); @@ -826,7 +826,7 @@ void ResourceDispatcherHost::StartDeferredRequest(int process_unique_id, // TODO(eroman): are there other considerations for paused or blocked // requests? - URLRequest* request = i->second; + net::URLRequest* request = i->second; InsertIntoResourceQueue(request, *InfoForRequest(request)); } @@ -927,11 +927,12 @@ void ResourceDispatcherHost::CancelRequestsForRoute(int child_id, // Although every matching request was in pending_requests_ when we built // matching_requests, it is normal for a matching request to be not found // in pending_requests_ after we have removed some matching requests from - // pending_requests_. For example, deleting a URLRequest that has + // pending_requests_. For example, deleting a net::URLRequest that has // exclusive (write) access to an HTTP cache entry may unblock another - // URLRequest that needs exclusive access to the same cache entry, and - // that URLRequest may complete and remove itself from pending_requests_. - // So we need to check that iter is not equal to pending_requests_.end(). + // net::URLRequest that needs exclusive access to the same cache entry, and + // that net::URLRequest may complete and remove itself from + // pending_requests_. So we need to check that iter is not equal to + // pending_requests_.end(). if (iter != pending_requests_.end()) RemovePendingRequest(iter); } @@ -996,9 +997,9 @@ void ResourceDispatcherHost::RemovePendingRequest( update_load_states_timer_.Stop(); } -// URLRequest::Delegate ------------------------------------------------------- +// net::URLRequest::Delegate --------------------------------------------------- -void ResourceDispatcherHost::OnReceivedRedirect(URLRequest* request, +void ResourceDispatcherHost::OnReceivedRedirect(net::URLRequest* request, const GURL& new_url, bool* defer_redirect) { VLOG(1) << "OnReceivedRedirect: " << request->url().spec(); @@ -1037,13 +1038,13 @@ void ResourceDispatcherHost::OnReceivedRedirect(URLRequest* request, } void ResourceDispatcherHost::OnAuthRequired( - URLRequest* request, + net::URLRequest* request, net::AuthChallengeInfo* auth_info) { // Create a login dialog on the UI thread to get authentication data, // or pull from cache and continue on the IO thread. // TODO(mpcomplete): We should block the parent tab while waiting for // authentication. - // That would also solve the problem of the URLRequest being cancelled + // That would also solve the problem of the net::URLRequest being cancelled // before we receive authentication. ResourceDispatcherHostRequestInfo* info = InfoForRequest(request); DCHECK(!info->login_handler()) << @@ -1052,7 +1053,7 @@ void ResourceDispatcherHost::OnAuthRequired( } void ResourceDispatcherHost::OnCertificateRequested( - URLRequest* request, + net::URLRequest* request, net::SSLCertRequestInfo* cert_request_info) { DCHECK(request); @@ -1071,14 +1072,14 @@ void ResourceDispatcherHost::OnCertificateRequested( } void ResourceDispatcherHost::OnSSLCertificateError( - URLRequest* request, + net::URLRequest* request, int cert_error, net::X509Certificate* cert) { DCHECK(request); SSLManager::OnSSLCertificateError(this, request, cert_error, cert); } -void ResourceDispatcherHost::OnSetCookie(URLRequest* request, +void ResourceDispatcherHost::OnSetCookie(net::URLRequest* request, const std::string& cookie_line, const net::CookieOptions& options, bool blocked_by_policy) { @@ -1094,7 +1095,7 @@ void ResourceDispatcherHost::OnSetCookie(URLRequest* request, request->url(), cookie_line, options, blocked_by_policy); } -void ResourceDispatcherHost::OnResponseStarted(URLRequest* request) { +void ResourceDispatcherHost::OnResponseStarted(net::URLRequest* request) { VLOG(1) << "OnResponseStarted: " << request->url().spec(); ResourceDispatcherHostRequestInfo* info = InfoForRequest(request); if (PauseRequestIfNeeded(info)) { @@ -1125,7 +1126,7 @@ void ResourceDispatcherHost::OnResponseStarted(URLRequest* request) { } } -bool ResourceDispatcherHost::CompleteResponseStarted(URLRequest* request) { +bool ResourceDispatcherHost::CompleteResponseStarted(net::URLRequest* request) { ResourceDispatcherHostRequestInfo* info = InfoForRequest(request); scoped_refptr<ResourceResponse> response(new ResourceResponse); @@ -1169,7 +1170,7 @@ void ResourceDispatcherHost::CancelRequest(int child_id, CancelRequestInternal(i->second, from_renderer); } -void ResourceDispatcherHost::CancelRequestInternal(URLRequest* request, +void ResourceDispatcherHost::CancelRequestInternal(net::URLRequest* request, bool from_renderer) { VLOG(1) << "CancelRequest: " << request->url().spec(); @@ -1218,7 +1219,7 @@ int ResourceDispatcherHost::IncrementOutstandingRequestsMemoryCost( // static int ResourceDispatcherHost::CalculateApproximateMemoryCost( - URLRequest* request) { + net::URLRequest* request) { // The following fields should be a minor size contribution (experimentally // on the order of 100). However since they are variable length, it could // in theory be a sizeable contribution. @@ -1253,7 +1254,7 @@ int ResourceDispatcherHost::CalculateApproximateMemoryCost( return kAvgBytesPerOutstandingRequest + strings_cost + upload_cost; } -void ResourceDispatcherHost::BeginRequestInternal(URLRequest* request) { +void ResourceDispatcherHost::BeginRequestInternal(net::URLRequest* request) { DCHECK(!request->is_pending()); ResourceDispatcherHostRequestInfo* info = InfoForRequest(request); @@ -1265,7 +1266,7 @@ void ResourceDispatcherHost::BeginRequestInternal(URLRequest* request) { // If enqueing/starting this request will exceed our per-process memory // bound, abort it right away. if (memory_cost > max_outstanding_requests_cost_per_process_) { - // We call "SimulateError()" as a way of setting the URLRequest's + // We call "SimulateError()" as a way of setting the net::URLRequest's // status -- it has no effect beyond this, since the request hasn't started. request->SimulateError(net::ERR_INSUFFICIENT_RESOURCES); @@ -1288,7 +1289,7 @@ void ResourceDispatcherHost::BeginRequestInternal(URLRequest* request) { GlobalRequestID global_id(info->child_id(), info->request_id()); pending_requests_[global_id] = request; - // Give the resource handlers an opportunity to delay the URLRequest from + // Give the resource handlers an opportunity to delay the net::URLRequest from // being started. // // There are three cases: @@ -1313,7 +1314,7 @@ void ResourceDispatcherHost::BeginRequestInternal(URLRequest* request) { } void ResourceDispatcherHost::InsertIntoResourceQueue( - URLRequest* request, + net::URLRequest* request, const ResourceDispatcherHostRequestInfo& request_info) { resource_queue_.AddRequest(request, request_info); @@ -1337,7 +1338,7 @@ void ResourceDispatcherHost::ResumeRequest(const GlobalRequestID& request_id) { if (i == pending_requests_.end()) // The request may have been destroyed return; - URLRequest* request = i->second; + net::URLRequest* request = i->second; ResourceDispatcherHostRequestInfo* info = InfoForRequest(request); if (!info->is_paused()) return; @@ -1357,7 +1358,7 @@ void ResourceDispatcherHost::ResumeRequest(const GlobalRequestID& request_id) { } } -void ResourceDispatcherHost::StartReading(URLRequest* request) { +void ResourceDispatcherHost::StartReading(net::URLRequest* request) { // Start reading. int bytes_read = 0; if (Read(request, &bytes_read)) { @@ -1369,7 +1370,7 @@ void ResourceDispatcherHost::StartReading(URLRequest* request) { } } -bool ResourceDispatcherHost::Read(URLRequest* request, int* bytes_read) { +bool ResourceDispatcherHost::Read(net::URLRequest* request, int* bytes_read) { ResourceDispatcherHostRequestInfo* info = InfoForRequest(request); DCHECK(!info->is_paused()); @@ -1387,7 +1388,7 @@ bool ResourceDispatcherHost::Read(URLRequest* request, int* bytes_read) { return request->Read(buf, buf_size, bytes_read); } -void ResourceDispatcherHost::OnReadCompleted(URLRequest* request, +void ResourceDispatcherHost::OnReadCompleted(net::URLRequest* request, int bytes_read) { DCHECK(request); VLOG(1) << "OnReadCompleted: " << request->url().spec(); @@ -1440,7 +1441,7 @@ void ResourceDispatcherHost::OnReadCompleted(URLRequest* request, OnResponseCompleted(request); } -bool ResourceDispatcherHost::CompleteRead(URLRequest* request, +bool ResourceDispatcherHost::CompleteRead(net::URLRequest* request, int* bytes_read) { if (!request || !request->status().is_success()) { NOTREACHED(); @@ -1457,7 +1458,7 @@ bool ResourceDispatcherHost::CompleteRead(URLRequest* request, return *bytes_read != 0; } -void ResourceDispatcherHost::OnResponseCompleted(URLRequest* request) { +void ResourceDispatcherHost::OnResponseCompleted(net::URLRequest* request) { VLOG(1) << "OnResponseCompleted: " << request->url().spec(); ResourceDispatcherHostRequestInfo* info = InfoForRequest(request); @@ -1494,16 +1495,16 @@ void ResourceDispatcherHost::OnResponseCompleted(URLRequest* request) { // static ResourceDispatcherHostRequestInfo* ResourceDispatcherHost::InfoForRequest( - URLRequest* request) { + net::URLRequest* request) { // Avoid writing this function twice by casting the cosnt version. - const URLRequest* const_request = request; + const net::URLRequest* const_request = request; return const_cast<ResourceDispatcherHostRequestInfo*>( InfoForRequest(const_request)); } // static const ResourceDispatcherHostRequestInfo* ResourceDispatcherHost::InfoForRequest( - const URLRequest* request) { + const net::URLRequest* request) { const ResourceDispatcherHostRequestInfo* info = static_cast<const ResourceDispatcherHostRequestInfo*>( request->GetUserData(NULL)); @@ -1512,9 +1513,10 @@ const ResourceDispatcherHostRequestInfo* ResourceDispatcherHost::InfoForRequest( } // static -bool ResourceDispatcherHost::RenderViewForRequest(const URLRequest* request, - int* render_process_host_id, - int* render_view_host_id) { +bool ResourceDispatcherHost::RenderViewForRequest( + const net::URLRequest* request, + int* render_process_host_id, + int* render_view_host_id) { const ResourceDispatcherHostRequestInfo* info = InfoForRequest(request); if (!info) { *render_process_host_id = -1; @@ -1553,7 +1555,7 @@ void ResourceDispatcherHost::RemoveObserver(Observer* obs) { observer_list_.RemoveObserver(obs); } -URLRequest* ResourceDispatcherHost::GetURLRequest( +net::URLRequest* ResourceDispatcherHost::GetURLRequest( const GlobalRequestID& request_id) const { // This should be running in the IO loop. DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); @@ -1565,7 +1567,7 @@ URLRequest* ResourceDispatcherHost::GetURLRequest( return i->second; } -static int GetCertID(URLRequest* request, int child_id) { +static int GetCertID(net::URLRequest* request, int child_id) { if (request->ssl_info().cert) { return CertStore::GetSharedInstance()->StoreCert(request->ssl_info().cert, child_id); @@ -1582,7 +1584,7 @@ static int GetCertID(URLRequest* request, int child_id) { return 0; } -void ResourceDispatcherHost::NotifyResponseStarted(URLRequest* request, +void ResourceDispatcherHost::NotifyResponseStarted(net::URLRequest* request, int child_id) { // Notify the observers on the IO thread. FOR_EACH_OBSERVER(Observer, observer_list_, OnRequestStarted(this, request)); @@ -1598,14 +1600,14 @@ void ResourceDispatcherHost::NotifyResponseStarted(URLRequest* request, ResourceRequestDetails(request, GetCertID(request, child_id))); } -void ResourceDispatcherHost::NotifyResponseCompleted(URLRequest* request, +void ResourceDispatcherHost::NotifyResponseCompleted(net::URLRequest* request, int child_id) { // Notify the observers on the IO thread. FOR_EACH_OBSERVER(Observer, observer_list_, OnResponseCompleted(this, request)); } -void ResourceDispatcherHost::NotifyReceivedRedirect(URLRequest* request, +void ResourceDispatcherHost::NotifyReceivedRedirect(net::URLRequest* request, int child_id, const GURL& new_url) { // Notify the observers on the IO thread. @@ -1687,7 +1689,7 @@ void ResourceDispatcherHost::UpdateLoadStates() { // in each View (good chance it's zero). std::map<std::pair<int, int>, uint64> largest_upload_size; for (i = pending_requests_.begin(); i != pending_requests_.end(); ++i) { - URLRequest* request = i->second; + net::URLRequest* request = i->second; ResourceDispatcherHostRequestInfo* info = InfoForRequest(request); uint64 upload_size = info->upload_size(); if (request->GetLoadState() != net::LOAD_STATE_SENDING_REQUEST) @@ -1698,7 +1700,7 @@ void ResourceDispatcherHost::UpdateLoadStates() { } for (i = pending_requests_.begin(); i != pending_requests_.end(); ++i) { - URLRequest* request = i->second; + net::URLRequest* request = i->second; net::LoadState load_state = request->GetLoadState(); ResourceDispatcherHostRequestInfo* info = InfoForRequest(request); @@ -1747,7 +1749,7 @@ void ResourceDispatcherHost::UpdateLoadStates() { // Returns true iff an upload progress message should be sent to the UI thread. bool ResourceDispatcherHost::MaybeUpdateUploadProgress( ResourceDispatcherHostRequestInfo *info, - URLRequest *request) { + net::URLRequest *request) { if (!info->upload_size() || info->waiting_for_upload_progress_ack()) return false; @@ -1818,7 +1820,7 @@ void ResourceDispatcherHost::ProcessBlockedRequestsForRoute( req_iter != requests->end(); ++req_iter) { // Remove the memory credit that we added when pushing the request onto // the blocked list. - URLRequest* request = *req_iter; + net::URLRequest* request = *req_iter; ResourceDispatcherHostRequestInfo* info = InfoForRequest(request); IncrementOutstandingRequestsMemoryCost(-1 * info->memory_cost(), info->child_id()); @@ -1831,7 +1833,7 @@ void ResourceDispatcherHost::ProcessBlockedRequestsForRoute( delete requests; } -bool ResourceDispatcherHost::IsValidRequest(URLRequest* request) { +bool ResourceDispatcherHost::IsValidRequest(net::URLRequest* request) { if (!request) return false; ResourceDispatcherHostRequestInfo* info = InfoForRequest(request); diff --git a/chrome/browser/renderer_host/resource_dispatcher_host.h b/chrome/browser/renderer_host/resource_dispatcher_host.h index 7fc27b8..840d2db 100644 --- a/chrome/browser/renderer_host/resource_dispatcher_host.h +++ b/chrome/browser/renderer_host/resource_dispatcher_host.h @@ -51,7 +51,7 @@ namespace webkit_blob { class DeletableFileReference; } -class ResourceDispatcherHost : public URLRequest::Delegate { +class ResourceDispatcherHost : public net::URLRequest::Delegate { public: // Implemented by the client of ResourceDispatcherHost to receive messages in // response to a resource load. The messages are intended to be forwarded to @@ -83,12 +83,12 @@ class ResourceDispatcherHost : public URLRequest::Delegate { public: virtual ~Observer() {} virtual void OnRequestStarted(ResourceDispatcherHost* resource_dispatcher, - URLRequest* request) = 0; + net::URLRequest* request) = 0; virtual void OnResponseCompleted( ResourceDispatcherHost* resource_dispatcher, - URLRequest* request) = 0; + net::URLRequest* request) = 0; virtual void OnReceivedRedirect(ResourceDispatcherHost* resource_dispatcher, - URLRequest* request, + net::URLRequest* request, const GURL& new_url) = 0; }; @@ -202,37 +202,38 @@ class ResourceDispatcherHost : public URLRequest::Delegate { // acts like CancelRequestsForProcess when route_id is -1. void CancelRequestsForRoute(int process_unique_id, int route_id); - // URLRequest::Delegate - virtual void OnReceivedRedirect(URLRequest* request, + // net::URLRequest::Delegate + virtual void OnReceivedRedirect(net::URLRequest* request, const GURL& new_url, bool* defer_redirect); - virtual void OnAuthRequired(URLRequest* request, + virtual void OnAuthRequired(net::URLRequest* request, net::AuthChallengeInfo* auth_info); virtual void OnCertificateRequested( - URLRequest* request, + net::URLRequest* request, net::SSLCertRequestInfo* cert_request_info); - virtual void OnSSLCertificateError(URLRequest* request, + virtual void OnSSLCertificateError(net::URLRequest* request, int cert_error, net::X509Certificate* cert); - virtual void OnSetCookie(URLRequest* request, + virtual void OnSetCookie(net::URLRequest* request, const std::string& cookie_line, const net::CookieOptions& options, bool blocked_by_policy); - virtual void OnResponseStarted(URLRequest* request); - virtual void OnReadCompleted(URLRequest* request, int bytes_read); - void OnResponseCompleted(URLRequest* request); + virtual void OnResponseStarted(net::URLRequest* request); + virtual void OnReadCompleted(net::URLRequest* request, int bytes_read); + void OnResponseCompleted(net::URLRequest* request); // Helper functions to get our extra data out of a request. The given request // must have been one we created so that it has the proper extra data pointer. - static ResourceDispatcherHostRequestInfo* InfoForRequest(URLRequest* request); + static ResourceDispatcherHostRequestInfo* InfoForRequest( + net::URLRequest* request); static const ResourceDispatcherHostRequestInfo* InfoForRequest( - const URLRequest* request); + const net::URLRequest* request); // Extracts the render view/process host's identifiers from the given request // and places them in the given out params (both required). If there are no // such IDs associated with the request (such as non-page-related requests), // this function will return false and both out params will be -1. - static bool RenderViewForRequest(const URLRequest* request, + static bool RenderViewForRequest(const net::URLRequest* request, int* render_process_host_id, int* render_view_host_id); @@ -244,11 +245,11 @@ class ResourceDispatcherHost : public URLRequest::Delegate { // Removes an observer. void RemoveObserver(Observer* obs); - // Retrieves a URLRequest. Must be called from the IO thread. - URLRequest* GetURLRequest(const GlobalRequestID& request_id) const; + // Retrieves a net::URLRequest. Must be called from the IO thread. + net::URLRequest* GetURLRequest(const GlobalRequestID& request_id) const; // Notifies our observers that a request has been cancelled. - void NotifyResponseCompleted(URLRequest* request, int process_unique_id); + void NotifyResponseCompleted(net::URLRequest* request, int process_unique_id); void RemovePendingRequest(int process_unique_id, int request_id); @@ -304,7 +305,7 @@ class ResourceDispatcherHost : public URLRequest::Delegate { // Associates the given info with the given request. The info will then be // owned by the request. - void SetRequestInfo(URLRequest* request, + void SetRequestInfo(net::URLRequest* request, ResourceDispatcherHostRequestInfo* info); // A shutdown helper that runs on the IO thread. @@ -317,36 +318,36 @@ class ResourceDispatcherHost : public URLRequest::Delegate { void ResumeRequest(const GlobalRequestID& request_id); // Internal function to start reading for the first time. - void StartReading(URLRequest* request); + void StartReading(net::URLRequest* request); // Reads data from the response using our internal buffer as async IO. // Returns true if data is available immediately, false otherwise. If the // return value is false, we will receive a OnReadComplete() callback later. - bool Read(URLRequest* request, int* bytes_read); + bool Read(net::URLRequest* request, int* bytes_read); // Internal function to finish an async IO which has completed. Returns // true if there is more data to read (e.g. we haven't read EOF yet and // no errors have occurred). - bool CompleteRead(URLRequest*, int* bytes_read); + bool CompleteRead(net::URLRequest*, int* bytes_read); // Internal function to finish handling the ResponseStarted message. Returns // true on success. - bool CompleteResponseStarted(URLRequest* request); + bool CompleteResponseStarted(net::URLRequest* request); // Helper function for regular and download requests. - void BeginRequestInternal(URLRequest* request); + void BeginRequestInternal(net::URLRequest* request); // Helper function that cancels |request|. - void CancelRequestInternal(URLRequest* request, bool from_renderer); + void CancelRequestInternal(net::URLRequest* request, bool from_renderer); // Helper function that inserts |request| into the resource queue. void InsertIntoResourceQueue( - URLRequest* request, + net::URLRequest* request, const ResourceDispatcherHostRequestInfo& request_info); // Updates the "cost" of outstanding requests for |process_unique_id|. // The "cost" approximates how many bytes are consumed by all the in-memory - // data structures supporting this request (URLRequest object, + // data structures supporting this request (net::URLRequest object, // HttpNetworkTransaction, etc...). // The value of |cost| is added to the running total, and the resulting // sum is returned. @@ -354,7 +355,7 @@ class ResourceDispatcherHost : public URLRequest::Delegate { int process_unique_id); // Estimate how much heap space |request| will consume to run. - static int CalculateApproximateMemoryCost(URLRequest* request); + static int CalculateApproximateMemoryCost(net::URLRequest* request); // The list of all requests that we have pending. This list is not really // optimized, and assumes that we have relatively few requests pending at once @@ -363,7 +364,7 @@ class ResourceDispatcherHost : public URLRequest::Delegate { // It may be enhanced in the future to provide some kind of prioritization // mechanism. We should also consider a hashtable or binary tree if it turns // out we have a lot of things here. - typedef std::map<GlobalRequestID, URLRequest*> PendingRequestList; + typedef std::map<GlobalRequestID, net::URLRequest*> PendingRequestList; // Deletes the pending request identified by the iterator passed in. // This function will invalidate the iterator passed in. Callers should @@ -371,10 +372,10 @@ class ResourceDispatcherHost : public URLRequest::Delegate { void RemovePendingRequest(const PendingRequestList::iterator& iter); // Notify our observers that we started receiving a response for a request. - void NotifyResponseStarted(URLRequest* request, int process_unique_id); + void NotifyResponseStarted(net::URLRequest* request, int process_unique_id); // Notify our observers that a request has been redirected. - void NotifyReceivedRedirect(URLRequest* request, + void NotifyReceivedRedirect(net::URLRequest* request, int process_unique_id, const GURL& new_url); @@ -393,7 +394,7 @@ class ResourceDispatcherHost : public URLRequest::Delegate { // Checks the upload state and sends an update if one is necessary. bool MaybeUpdateUploadProgress(ResourceDispatcherHostRequestInfo *info, - URLRequest *request); + net::URLRequest *request); // Resumes or cancels (if |cancel_requests| is true) any blocked requests. void ProcessBlockedRequestsForRoute(int process_unique_id, @@ -430,7 +431,7 @@ class ResourceDispatcherHost : public URLRequest::Delegate { ResourceHandler* handler, int child_id, int route_id, bool download); // Returns true if |request| is in |pending_requests_|. - bool IsValidRequest(URLRequest* request); + bool IsValidRequest(net::URLRequest* request); // Returns true if the message passed in is a resource related message. static bool IsResourceDispatcherHostMessage(const IPC::Message&); @@ -500,7 +501,7 @@ class ResourceDispatcherHost : public URLRequest::Delegate { // True if the resource dispatcher host has been shut down. bool is_shutdown_; - typedef std::vector<URLRequest*> BlockedRequestsList; + typedef std::vector<net::URLRequest*> BlockedRequestsList; typedef std::pair<int, int> ProcessRouteIDs; typedef std::map<ProcessRouteIDs, BlockedRequestsList*> BlockedRequestMap; BlockedRequestMap blocked_requests_map_; diff --git a/chrome/browser/renderer_host/resource_dispatcher_host_request_info.h b/chrome/browser/renderer_host/resource_dispatcher_host_request_info.h index 9d5e386..032c4bd 100644 --- a/chrome/browser/renderer_host/resource_dispatcher_host_request_info.h +++ b/chrome/browser/renderer_host/resource_dispatcher_host_request_info.h @@ -27,7 +27,7 @@ class BlobData; // Holds the data ResourceDispatcherHost associates with each request. // Retrieve this data by calling ResourceDispatcherHost::InfoForRequest. -class ResourceDispatcherHostRequestInfo : public URLRequest::UserData { +class ResourceDispatcherHostRequestInfo : public net::URLRequest::UserData { public: // This will take a reference to the handler. ResourceDispatcherHostRequestInfo( diff --git a/chrome/browser/renderer_host/resource_dispatcher_host_unittest.cc b/chrome/browser/renderer_host/resource_dispatcher_host_unittest.cc index 209bce3..4ca79ac 100644 --- a/chrome/browser/renderer_host/resource_dispatcher_host_unittest.cc +++ b/chrome/browser/renderer_host/resource_dispatcher_host_unittest.cc @@ -184,15 +184,16 @@ class ResourceDispatcherHostTest : public testing::Test, DCHECK(!test_fixture_); test_fixture_ = this; ChildProcessSecurityPolicy::GetInstance()->Add(0); - URLRequest::RegisterProtocolFactory("test", - &ResourceDispatcherHostTest::Factory); + net::URLRequest::RegisterProtocolFactory( + "test", + &ResourceDispatcherHostTest::Factory); EnsureTestSchemeIsAllowed(); } virtual void TearDown() { - URLRequest::RegisterProtocolFactory("test", NULL); + net::URLRequest::RegisterProtocolFactory("test", NULL); if (!scheme_.empty()) - URLRequest::RegisterProtocolFactory(scheme_, old_factory_); + net::URLRequest::RegisterProtocolFactory(scheme_, old_factory_); DCHECK(test_fixture_ == this); test_fixture_ = NULL; @@ -250,12 +251,12 @@ class ResourceDispatcherHostTest : public testing::Test, DCHECK(scheme_.empty()); DCHECK(!old_factory_); scheme_ = scheme; - old_factory_ = URLRequest::RegisterProtocolFactory( - scheme_, &ResourceDispatcherHostTest::Factory); + old_factory_ = net::URLRequest::RegisterProtocolFactory( + scheme_, &ResourceDispatcherHostTest::Factory); } // Our own URLRequestJob factory. - static URLRequestJob* Factory(URLRequest* request, + static URLRequestJob* Factory(net::URLRequest* request, const std::string& scheme) { if (test_fixture_->response_headers_.empty()) { return new URLRequestTestJob(request); @@ -273,7 +274,7 @@ class ResourceDispatcherHostTest : public testing::Test, std::string response_headers_; std::string response_data_; std::string scheme_; - URLRequest::ProtocolFactory* old_factory_; + net::URLRequest::ProtocolFactory* old_factory_; ResourceType::Type resource_type_; static ResourceDispatcherHostTest* test_fixture_; }; @@ -651,7 +652,7 @@ TEST_F(ResourceDispatcherHostTest, TestBlockedRequestsDontLeak) { // Test the private helper method "CalculateApproximateMemoryCost()". TEST_F(ResourceDispatcherHostTest, CalculateApproximateMemoryCost) { - URLRequest req(GURL("http://www.google.com"), NULL); + net::URLRequest req(GURL("http://www.google.com"), NULL); EXPECT_EQ(4427, ResourceDispatcherHost::CalculateApproximateMemoryCost(&req)); // Add 9 bytes of referrer. diff --git a/chrome/browser/renderer_host/resource_handler.h b/chrome/browser/renderer_host/resource_handler.h index 56f70bd..bc05b17 100644 --- a/chrome/browser/renderer_host/resource_handler.h +++ b/chrome/browser/renderer_host/resource_handler.h @@ -48,11 +48,11 @@ class ResourceHandler virtual bool OnResponseStarted(int request_id, ResourceResponse* response) = 0; - // Called before the URLRequest for |request_id| (whose url is |url|) is to be - // started. If the handler returns false, then the request is cancelled. + // Called before the net::URLRequest for |request_id| (whose url is |url|) is + // to be started. If the handler returns false, then the request is cancelled. // Otherwise if the return value is true, the ResourceHandler can delay the // request from starting by setting |*defer = true|. A deferred request will - // not have called URLRequest::Start(), and will not resume until someone + // not have called net::URLRequest::Start(), and will not resume until someone // calls ResourceDispatcherHost::StartDeferredRequest(). virtual bool OnWillStart(int request_id, const GURL& url, bool* defer) = 0; @@ -77,7 +77,7 @@ class ResourceHandler const std::string& security_info) = 0; // Signals that the request is closed (i.e. finished successfully, cancelled). - // This is a signal that the associated URLRequest isn't valid anymore. + // This is a signal that the associated net::URLRequest isn't valid anymore. virtual void OnRequestClosed() = 0; // This notification is synthesized by the RedirectToFileResourceHandler diff --git a/chrome/browser/renderer_host/resource_queue.cc b/chrome/browser/renderer_host/resource_queue.cc index 668f6e6..66d02a1 100644 --- a/chrome/browser/renderer_host/resource_queue.cc +++ b/chrome/browser/renderer_host/resource_queue.cc @@ -37,7 +37,7 @@ void ResourceQueue::Shutdown() { } void ResourceQueue::AddRequest( - URLRequest* request, + net::URLRequest* request, const ResourceDispatcherHostRequestInfo& request_info) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); DCHECK(!shutdown_); @@ -84,7 +84,7 @@ void ResourceQueue::StartDelayedRequest(ResourceQueueDelegate* delegate, interested_delegates_.erase(request_id); if (ContainsKey(requests_, request_id)) { - URLRequest* request = requests_[request_id]; + net::URLRequest* request = requests_[request_id]; // The request shouldn't have started (SUCCESS is the initial state). DCHECK_EQ(URLRequestStatus::SUCCESS, request->status().status()); request->Start(); diff --git a/chrome/browser/renderer_host/resource_queue.h b/chrome/browser/renderer_host/resource_queue.h index d6ce412..e3e5e2f 100644 --- a/chrome/browser/renderer_host/resource_queue.h +++ b/chrome/browser/renderer_host/resource_queue.h @@ -18,7 +18,7 @@ class URLRequest; class ResourceDispatcherHostRequestInfo; struct GlobalRequestID; -// Makes decisions about delaying or not each URLRequest in the queue. +// Makes decisions about delaying or not each net::URLRequest in the queue. // All methods are called on the IO thread. class ResourceQueueDelegate { public: @@ -65,8 +65,8 @@ class ResourceQueue { void AddRequest(net::URLRequest* request, const ResourceDispatcherHostRequestInfo& request_info); - // Tells the queue that the URLRequest object associated with |request_id| - // is no longer valid. + // Tells the queue that the net::URLRequest object associated with + // |request_id| is no longer valid. void RemoveRequest(const GlobalRequestID& request_id); // A delegate should call StartDelayedRequest when it wants to allow the @@ -83,8 +83,8 @@ class ResourceQueue { // initialized. DelegateSet delegates_; - // Stores URLRequest objects associated with each GlobalRequestID. This helps - // decoupling the queue from ResourceDispatcherHost. + // Stores net::URLRequest objects associated with each GlobalRequestID. This + // helps decoupling the queue from ResourceDispatcherHost. RequestMap requests_; // Maps a GlobalRequestID to the set of delegates that want to prevent the diff --git a/chrome/browser/renderer_host/resource_queue_unittest.cc b/chrome/browser/renderer_host/resource_queue_unittest.cc index 30ebc2f..983ea0c 100644 --- a/chrome/browser/renderer_host/resource_queue_unittest.cc +++ b/chrome/browser/renderer_host/resource_queue_unittest.cc @@ -100,7 +100,7 @@ class NeverDelayingDelegate : public ResourceQueueDelegate { } virtual bool ShouldDelayRequest( - URLRequest* request, + net::URLRequest* request, const ResourceDispatcherHostRequestInfo& request_info, const GlobalRequestID& request_id) { return false; @@ -120,7 +120,7 @@ class AlwaysDelayingDelegate : public ResourceQueueDelegate { } virtual bool ShouldDelayRequest( - URLRequest* request, + net::URLRequest* request, const ResourceDispatcherHostRequestInfo& request_info, const GlobalRequestID& request_id) { delayed_requests_.push_back(request_id); @@ -151,7 +151,8 @@ class AlwaysDelayingDelegate : public ResourceQueueDelegate { DISALLOW_COPY_AND_ASSIGN(AlwaysDelayingDelegate); }; -class ResourceQueueTest : public testing::Test, public URLRequest::Delegate { +class ResourceQueueTest : public testing::Test, + public net::URLRequest::Delegate { public: ResourceQueueTest() : response_started_count_(0), @@ -160,14 +161,14 @@ class ResourceQueueTest : public testing::Test, public URLRequest::Delegate { io_thread_(BrowserThread::IO, &message_loop_) { } - virtual void OnResponseStarted(URLRequest* request) { + virtual void OnResponseStarted(net::URLRequest* request) { response_started_count_++; // We're not going to do anything more with the request. Cancel it now // to avoid leaking URLRequestJob. request->Cancel(); } - virtual void OnReadCompleted(URLRequest* request, int bytes_read) { + virtual void OnReadCompleted(net::URLRequest* request, int bytes_read) { } protected: @@ -192,7 +193,7 @@ TEST_F(ResourceQueueTest, NeverDelayingDelegate) { NeverDelayingDelegate delegate; InitializeQueue(&queue, &delegate); - URLRequest request(GURL(kTestUrl), this); + net::URLRequest request(GURL(kTestUrl), this); scoped_ptr<ResourceDispatcherHostRequestInfo> request_info(GetRequestInfo(0)); EXPECT_EQ(0, response_started_count_); queue.AddRequest(&request, *request_info.get()); @@ -208,7 +209,7 @@ TEST_F(ResourceQueueTest, AlwaysDelayingDelegate) { AlwaysDelayingDelegate delegate(&queue); InitializeQueue(&queue, &delegate); - URLRequest request(GURL(kTestUrl), this); + net::URLRequest request(GURL(kTestUrl), this); scoped_ptr<ResourceDispatcherHostRequestInfo> request_info(GetRequestInfo(0)); EXPECT_EQ(0, response_started_count_); queue.AddRequest(&request, *request_info.get()); @@ -227,7 +228,7 @@ TEST_F(ResourceQueueTest, AlwaysDelayingDelegateAfterShutdown) { AlwaysDelayingDelegate delegate(&queue); InitializeQueue(&queue, &delegate); - URLRequest request(GURL(kTestUrl), this); + net::URLRequest request(GURL(kTestUrl), this); scoped_ptr<ResourceDispatcherHostRequestInfo> request_info(GetRequestInfo(0)); EXPECT_EQ(0, response_started_count_); queue.AddRequest(&request, *request_info.get()); @@ -248,7 +249,7 @@ TEST_F(ResourceQueueTest, TwoDelegates) { NeverDelayingDelegate never_delaying_delegate; InitializeQueue(&queue, &always_delaying_delegate, &never_delaying_delegate); - URLRequest request(GURL(kTestUrl), this); + net::URLRequest request(GURL(kTestUrl), this); scoped_ptr<ResourceDispatcherHostRequestInfo> request_info(GetRequestInfo(0)); EXPECT_EQ(0, response_started_count_); queue.AddRequest(&request, *request_info.get()); @@ -267,7 +268,7 @@ TEST_F(ResourceQueueTest, RemoveRequest) { AlwaysDelayingDelegate delegate(&queue); InitializeQueue(&queue, &delegate); - URLRequest request(GURL(kTestUrl), this); + net::URLRequest request(GURL(kTestUrl), this); scoped_ptr<ResourceDispatcherHostRequestInfo> request_info(GetRequestInfo(0)); GlobalRequestID request_id(request_info->child_id(), request_info->request_id()); diff --git a/chrome/browser/renderer_host/resource_request_details.cc b/chrome/browser/renderer_host/resource_request_details.cc index 20a255d..6facdd6 100644 --- a/chrome/browser/renderer_host/resource_request_details.cc +++ b/chrome/browser/renderer_host/resource_request_details.cc @@ -4,8 +4,7 @@ #include "chrome/browser/renderer_host/resource_request_details.h" - -ResourceRequestDetails::ResourceRequestDetails(const URLRequest* request, +ResourceRequestDetails::ResourceRequestDetails(const net::URLRequest* request, int cert_id) : url_(request->url()), original_url_(request->original_url()), @@ -44,7 +43,7 @@ ResourceRequestDetails::ResourceRequestDetails(const URLRequest* request, ResourceRequestDetails::~ResourceRequestDetails() {} -ResourceRedirectDetails::ResourceRedirectDetails(const URLRequest* request, +ResourceRedirectDetails::ResourceRedirectDetails(const net::URLRequest* request, int cert_id, const GURL& new_url) : ResourceRequestDetails(request, cert_id), diff --git a/chrome/browser/renderer_host/resource_request_details.h b/chrome/browser/renderer_host/resource_request_details.h index bdb87bf..0d05804 100644 --- a/chrome/browser/renderer_host/resource_request_details.h +++ b/chrome/browser/renderer_host/resource_request_details.h @@ -4,7 +4,7 @@ // The ResourceRequestDetails object contains additional details about a // resource request. It copies many of the publicly accessible member variables -// of URLRequest, but exists on the UI thread. +// of net::URLRequest, but exists on the UI thread. #ifndef CHROME_BROWSER_RENDERER_HOST_RESOURCE_REQUEST_DETAILS_H_ #define CHROME_BROWSER_RENDERER_HOST_RESOURCE_REQUEST_DETAILS_H_ diff --git a/chrome/browser/renderer_host/safe_browsing_resource_handler.cc b/chrome/browser/renderer_host/safe_browsing_resource_handler.cc index 3222ecc..6a03764 100644 --- a/chrome/browser/renderer_host/safe_browsing_resource_handler.cc +++ b/chrome/browser/renderer_host/safe_browsing_resource_handler.cc @@ -177,7 +177,7 @@ void SafeBrowsingResourceHandler::StartDisplayingBlockingPage( // Grab the original url of this request as well. GURL original_url; - URLRequest* request = rdh_->GetURLRequest( + net::URLRequest* request = rdh_->GetURLRequest( GlobalRequestID(render_process_host_id_, deferred_request_id_)); if (request) original_url = request->original_url(); diff --git a/chrome/browser/renderer_host/sync_resource_handler.cc b/chrome/browser/renderer_host/sync_resource_handler.cc index db5ec9a..6743e861 100644 --- a/chrome/browser/renderer_host/sync_resource_handler.cc +++ b/chrome/browser/renderer_host/sync_resource_handler.cc @@ -39,7 +39,7 @@ bool SyncResourceHandler::OnRequestRedirected(int request_id, const GURL& new_url, ResourceResponse* response, bool* defer) { - URLRequest* request = rdh_->GetURLRequest( + net::URLRequest* request = rdh_->GetURLRequest( GlobalRequestID(process_id_, request_id)); LoadTimingObserver::PopulateTimingInfo(request, response); DevToolsNetLogObserver::PopulateResponseInfo(request, response); @@ -56,7 +56,7 @@ bool SyncResourceHandler::OnRequestRedirected(int request_id, bool SyncResourceHandler::OnResponseStarted(int request_id, ResourceResponse* response) { - URLRequest* request = rdh_->GetURLRequest( + net::URLRequest* request = rdh_->GetURLRequest( GlobalRequestID(process_id_, request_id)); LoadTimingObserver::PopulateTimingInfo(request, response); DevToolsNetLogObserver::PopulateResponseInfo(request, response); @@ -114,5 +114,5 @@ void SyncResourceHandler::OnRequestClosed() { result_message_->set_reply_error(); receiver_->Send(result_message_); - receiver_ = NULL; // URLRequest is gone, and perhaps also the receiver. + receiver_ = NULL; // net::URLRequest is gone, and perhaps also the receiver. } diff --git a/chrome/browser/renderer_host/test/render_view_host_unittest.cc b/chrome/browser/renderer_host/test/render_view_host_unittest.cc index 2ec5b95..da5a579 100644 --- a/chrome/browser/renderer_host/test/render_view_host_unittest.cc +++ b/chrome/browser/renderer_host/test/render_view_host_unittest.cc @@ -46,7 +46,7 @@ TEST_F(RenderViewHostTest, ResetUnloadOnReload) { NavigateAndCommit(url1); controller().LoadURL(url2, GURL(), 0); - // Simulate the ClosePage call which is normally sent by the URLRequest. + // Simulate the ClosePage call which is normally sent by the net::URLRequest. rvh()->ClosePage(true, 0, 0); // Needed so that navigations are not suspended on the RVH. Normally handled // by way of ViewHostMsg_ShouldClose_ACK. diff --git a/chrome/browser/renderer_host/x509_user_cert_resource_handler.cc b/chrome/browser/renderer_host/x509_user_cert_resource_handler.cc index 9e1cccc..cbd5b08 100644 --- a/chrome/browser/renderer_host/x509_user_cert_resource_handler.cc +++ b/chrome/browser/renderer_host/x509_user_cert_resource_handler.cc @@ -22,7 +22,7 @@ #include "net/url_request/url_request_status.h" X509UserCertResourceHandler::X509UserCertResourceHandler( - ResourceDispatcherHost* host, URLRequest* request, + ResourceDispatcherHost* host, net::URLRequest* request, int render_process_host_id, int render_view_id) : host_(host), request_(request), |