Index: webkit/tools/test_shell/simple_resource_loader_bridge.cc |
diff --git a/webkit/tools/test_shell/simple_resource_loader_bridge.cc b/webkit/tools/test_shell/simple_resource_loader_bridge.cc |
index 351c5d99f6b552bcbe9347f2553de841d1b87dc9..73e4bb2db45e68e30b3f89f1a7f18fcdf9b1b3a4 100644 |
--- a/webkit/tools/test_shell/simple_resource_loader_bridge.cc |
+++ b/webkit/tools/test_shell/simple_resource_loader_bridge.cc |
@@ -3,22 +3,22 @@ |
// found in the LICENSE file. |
// |
// This file contains an implementation of the ResourceLoaderBridge class. |
-// The class is implemented using URLRequest, meaning it is a "simple" version |
-// that directly issues requests. The more complicated one used in the |
+// The class is implemented using net::URLRequest, meaning it is a "simple" |
+// version that directly issues requests. The more complicated one used in the |
// browser uses IPC. |
// |
-// Because URLRequest only provides an asynchronous resource loading API, this |
-// file makes use of URLRequest from a background IO thread. Requests for |
-// cookies and synchronously loaded resources result in the main thread of the |
-// application blocking until the IO thread completes the operation. (See |
+// Because net::URLRequest only provides an asynchronous resource loading API, |
+// this file makes use of net::URLRequest from a background IO thread. Requests |
+// for cookies and synchronously loaded resources result in the main thread of |
+// the application blocking until the IO thread completes the operation. (See |
// GetCookies and SyncLoad) |
// |
// Main thread IO thread |
// ----------- --------- |
// ResourceLoaderBridge <---o---------> RequestProxy (normal case) |
-// \ -> URLRequest |
+// \ -> net::URLRequest |
// o-------> SyncRequestProxy (synchronous case) |
-// -> URLRequest |
+// -> net::URLRequest |
// SetCookie <------------------------> CookieSetter |
// -> net_util::SetCookie |
// GetCookies <-----------------------> CookieGetter |
@@ -26,7 +26,7 @@ |
// |
// NOTE: The implementation in this file may be used to have WebKit fetch |
// resources in-process. For example, it is handy for building a single- |
-// process WebKit embedding (e.g., test_shell) that can use URLRequest to |
+// process WebKit embedding (e.g., test_shell) that can use net::URLRequest to |
// perform URL loads. See renderer/resource_dispatcher.h for details on an |
// alternate implementation that defers fetching to another process. |
@@ -97,7 +97,7 @@ struct TestShellRequestContextParams { |
bool accept_all_cookies; |
}; |
-static URLRequestJob* BlobURLRequestJobFactory(URLRequest* request, |
+static URLRequestJob* BlobURLRequestJobFactory(net::URLRequest* request, |
const std::string& scheme) { |
webkit_blob::BlobStorageController* blob_storage_controller = |
static_cast<TestShellRequestContext*>(request->context())-> |
@@ -147,7 +147,7 @@ class IOThread : public base::Thread { |
TestShellWebBlobRegistryImpl::InitializeOnIOThread( |
g_request_context->blob_storage_controller()); |
- URLRequest::RegisterProtocolFactory("blob", &BlobURLRequestJobFactory); |
+ net::URLRequest::RegisterProtocolFactory("blob", &BlobURLRequestJobFactory); |
} |
virtual void CleanUp() { |
@@ -193,9 +193,9 @@ struct RequestParams { |
static const int kUpdateUploadProgressIntervalMsec = 100; |
// The RequestProxy does most of its work on the IO thread. The Start and |
-// Cancel methods are proxied over to the IO thread, where an URLRequest object |
-// is instantiated. |
-class RequestProxy : public URLRequest::Delegate, |
+// Cancel methods are proxied over to the IO thread, where an net::URLRequest |
+// object is instantiated. |
+class RequestProxy : public net::URLRequest::Delegate, |
public base::RefCountedThreadSafe<RequestProxy> { |
public: |
// Takes ownership of the params. |
@@ -235,7 +235,7 @@ class RequestProxy : public URLRequest::Delegate, |
// -------------------------------------------------------------------------- |
// The following methods are called on the owner's thread in response to |
- // various URLRequest callbacks. The event hooks, defined below, trigger |
+ // various net::URLRequest callbacks. The event hooks, defined below, trigger |
// these methods asynchronously. |
void NotifyReceivedRedirect(const GURL& new_url, |
@@ -317,7 +317,7 @@ class RequestProxy : public URLRequest::Delegate, |
params->upload.get()); |
} |
- request_.reset(new URLRequest(params->url, this)); |
+ request_.reset(new net::URLRequest(params->url, this)); |
request_->set_method(params->method); |
request_->set_first_party_for_cookies(params->first_party_for_cookies); |
request_->set_referrer(params->referrer.spec()); |
@@ -391,7 +391,7 @@ class RequestProxy : public URLRequest::Delegate, |
} |
// -------------------------------------------------------------------------- |
- // The following methods are event hooks (corresponding to URLRequest |
+ // The following methods are event hooks (corresponding to net::URLRequest |
// callbacks) that run on the IO thread. They are designed to be overridden |
// by the SyncRequestProxy subclass. |
@@ -437,9 +437,9 @@ class RequestProxy : public URLRequest::Delegate, |
} |
// -------------------------------------------------------------------------- |
- // URLRequest::Delegate implementation: |
+ // net::URLRequest::Delegate implementation: |
- virtual void OnReceivedRedirect(URLRequest* request, |
+ virtual void OnReceivedRedirect(net::URLRequest* request, |
const GURL& new_url, |
bool* defer_redirect) { |
DCHECK(request->status().is_success()); |
@@ -448,7 +448,7 @@ class RequestProxy : public URLRequest::Delegate, |
OnReceivedRedirect(new_url, info, defer_redirect); |
} |
- virtual void OnResponseStarted(URLRequest* request) { |
+ virtual void OnResponseStarted(net::URLRequest* request) { |
if (request->status().is_success()) { |
ResourceResponseInfo info; |
PopulateResponseInfo(request, &info); |
@@ -459,14 +459,14 @@ class RequestProxy : public URLRequest::Delegate, |
} |
} |
- virtual void OnSSLCertificateError(URLRequest* request, |
+ virtual void OnSSLCertificateError(net::URLRequest* request, |
int cert_error, |
net::X509Certificate* cert) { |
// Allow all certificate errors. |
request->ContinueDespiteLastError(); |
} |
- virtual void OnReadCompleted(URLRequest* request, int bytes_read) { |
+ virtual void OnReadCompleted(net::URLRequest* request, int bytes_read) { |
if (request->status().is_success() && bytes_read > 0) { |
OnReceivedData(bytes_read); |
} else { |
@@ -489,8 +489,8 @@ class RequestProxy : public URLRequest::Delegate, |
// Called on the IO thread. |
void MaybeUpdateUploadProgress() { |
- // If a redirect is received upload is cancelled in URLRequest, we should |
- // try to stop the |upload_progress_timer_| timer and return. |
+ // If a redirect is received upload is cancelled in net::URLRequest, we |
+ // should try to stop the |upload_progress_timer_| timer and return. |
if (!request_->has_upload()) { |
if (upload_progress_timer_.IsRunning()) |
upload_progress_timer_.Stop(); |
@@ -522,7 +522,7 @@ class RequestProxy : public URLRequest::Delegate, |
} |
} |
- void PopulateResponseInfo(URLRequest* request, |
+ void PopulateResponseInfo(net::URLRequest* request, |
ResourceResponseInfo* info) const { |
info->request_time = request->request_time(); |
info->response_time = request->response_time(); |
@@ -538,7 +538,7 @@ class RequestProxy : public URLRequest::Delegate, |
&info->appcache_manifest_url); |
} |
- scoped_ptr<URLRequest> request_; |
+ scoped_ptr<net::URLRequest> request_; |
// Support for request.download_to_file behavior. |
bool download_to_file_; |