summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
authorshalev@chromium.org <shalev@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-24 17:42:49 +0000
committershalev@chromium.org <shalev@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-24 17:42:49 +0000
commit9d5730b2fd88a6e7710c250b5b0d875d193d8325 (patch)
treed3bc335707cdaf28335577a627e9a3c8a336a514 /webkit
parent468dc4e4a82846f5677c9a906afadb8df590871a (diff)
downloadchromium_src-9d5730b2fd88a6e7710c250b5b0d875d193d8325.zip
chromium_src-9d5730b2fd88a6e7710c250b5b0d875d193d8325.tar.gz
chromium_src-9d5730b2fd88a6e7710c250b5b0d875d193d8325.tar.bz2
Turned job_factory into a pure virtual class
This makes it possible to create wrappers for job_factory that handle a particular job type, and forward the rest to the old job_factory. TBR=michaeln@chromium.org, brettw@chromium.org, davemoore@chromium.org, kalman@chromium.org, benjhayden@chromium.org, jochen@chromium.org BUG=None Review URL: https://chromiumcodereview.appspot.com/10836248 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@153241 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r--webkit/appcache/appcache_update_job_unittest.cc26
-rw-r--r--webkit/fileapi/local_file_system_operation_write_unittest.cc4
-rw-r--r--webkit/tools/test_shell/test_shell_request_context.cc4
3 files changed, 17 insertions, 17 deletions
diff --git a/webkit/appcache/appcache_update_job_unittest.cc b/webkit/appcache/appcache_update_job_unittest.cc
index 73f8692..51e6331 100644
--- a/webkit/appcache/appcache_update_job_unittest.cc
+++ b/webkit/appcache/appcache_update_job_unittest.cc
@@ -12,7 +12,7 @@
#include "net/base/net_errors.h"
#include "net/http/http_response_headers.h"
#include "net/url_request/url_request_error_job.h"
-#include "net/url_request/url_request_job_factory.h"
+#include "net/url_request/url_request_job_factory_impl.h"
#include "net/url_request/url_request_test_job.h"
#include "net/url_request/url_request_test_util.h"
#include "webkit/appcache/appcache_group.h"
@@ -561,7 +561,7 @@ class IOThread : public base::Thread {
}
virtual void Init() {
- job_factory_.reset(new net::URLRequestJobFactory);
+ job_factory_.reset(new net::URLRequestJobFactoryImpl);
job_factory_->SetProtocolHandler("http", new MockHttpServerJobFactory);
job_factory_->SetProtocolHandler("https", new MockHttpServerJobFactory);
request_context_.reset(new TestURLRequestContext());
@@ -773,7 +773,7 @@ class AppCacheUpdateJobTest : public testing::Test,
void ManifestRedirectTest() {
ASSERT_EQ(MessageLoop::TYPE_IO, MessageLoop::current()->type());
- net::URLRequestJobFactory* new_factory(new net::URLRequestJobFactory);
+ net::URLRequestJobFactory* new_factory(new net::URLRequestJobFactoryImpl);
new_factory->SetProtocolHandler("http", new RedirectFactory);
io_thread_->SetNewJobFactory(new_factory);
@@ -1636,7 +1636,7 @@ class AppCacheUpdateJobTest : public testing::Test,
// Set some large number of times to return retry.
// Expect 1 manifest fetch and 3 retries.
RetryRequestTestJob::Initialize(5, RetryRequestTestJob::RETRY_AFTER_0, 4);
- net::URLRequestJobFactory* new_factory(new net::URLRequestJobFactory);
+ net::URLRequestJobFactory* new_factory(new net::URLRequestJobFactoryImpl);
new_factory->SetProtocolHandler("http", new RetryRequestTestJobFactory);
io_thread_->SetNewJobFactory(new_factory);
@@ -1667,7 +1667,7 @@ class AppCacheUpdateJobTest : public testing::Test,
// Set some large number of times to return retry.
// Expect 1 manifest fetch and 0 retries.
RetryRequestTestJob::Initialize(5, RetryRequestTestJob::NO_RETRY_AFTER, 1);
- net::URLRequestJobFactory* new_factory(new net::URLRequestJobFactory);
+ net::URLRequestJobFactory* new_factory(new net::URLRequestJobFactoryImpl);
new_factory->SetProtocolHandler("http", new RetryRequestTestJobFactory);
io_thread_->SetNewJobFactory(new_factory);
@@ -1699,7 +1699,7 @@ class AppCacheUpdateJobTest : public testing::Test,
// Expect 1 request and 0 retry attempts.
RetryRequestTestJob::Initialize(
5, RetryRequestTestJob::NONZERO_RETRY_AFTER, 1);
- net::URLRequestJobFactory* new_factory(new net::URLRequestJobFactory);
+ net::URLRequestJobFactory* new_factory(new net::URLRequestJobFactoryImpl);
new_factory->SetProtocolHandler("http", new RetryRequestTestJobFactory);
io_thread_->SetNewJobFactory(new_factory);
@@ -1730,7 +1730,7 @@ class AppCacheUpdateJobTest : public testing::Test,
// Set 2 as the retry limit (does not exceed the max).
// Expect 1 manifest fetch, 2 retries, 1 url fetch, 1 manifest refetch.
RetryRequestTestJob::Initialize(2, RetryRequestTestJob::RETRY_AFTER_0, 5);
- net::URLRequestJobFactory* new_factory(new net::URLRequestJobFactory);
+ net::URLRequestJobFactory* new_factory(new net::URLRequestJobFactoryImpl);
new_factory->SetProtocolHandler("http", new RetryRequestTestJobFactory);
io_thread_->SetNewJobFactory(new_factory);
@@ -1761,7 +1761,7 @@ class AppCacheUpdateJobTest : public testing::Test,
// Set 1 as the retry limit (does not exceed the max).
// Expect 1 manifest fetch, 1 url fetch, 1 url retry, 1 manifest refetch.
RetryRequestTestJob::Initialize(1, RetryRequestTestJob::RETRY_AFTER_0, 4);
- net::URLRequestJobFactory* new_factory(new net::URLRequestJobFactory);
+ net::URLRequestJobFactory* new_factory(new net::URLRequestJobFactoryImpl);
new_factory->SetProtocolHandler("http", new RetryRequestTestJobFactory);
io_thread_->SetNewJobFactory(new_factory);
@@ -2603,7 +2603,7 @@ class AppCacheUpdateJobTest : public testing::Test,
void IfModifiedSinceTest() {
ASSERT_EQ(MessageLoop::TYPE_IO, MessageLoop::current()->type());
- net::URLRequestJobFactory* new_factory(new net::URLRequestJobFactory);
+ net::URLRequestJobFactory* new_factory(new net::URLRequestJobFactoryImpl);
new_factory->SetProtocolHandler("http", new IfModifiedSinceJobFactory);
io_thread_->SetNewJobFactory(new_factory);
@@ -2669,7 +2669,7 @@ class AppCacheUpdateJobTest : public testing::Test,
ASSERT_EQ(MessageLoop::TYPE_IO, MessageLoop::current()->type());
HttpHeadersRequestTestJob::Initialize("Sat, 29 Oct 1994 19:43:31 GMT", "");
- net::URLRequestJobFactory* new_factory(new net::URLRequestJobFactory);
+ net::URLRequestJobFactory* new_factory(new net::URLRequestJobFactoryImpl);
new_factory->SetProtocolHandler("http", new IfModifiedSinceJobFactory);
io_thread_->SetNewJobFactory(new_factory);
@@ -2728,7 +2728,7 @@ class AppCacheUpdateJobTest : public testing::Test,
ASSERT_EQ(MessageLoop::TYPE_IO, MessageLoop::current()->type());
HttpHeadersRequestTestJob::Initialize("", "\"LadeDade\"");
- net::URLRequestJobFactory* new_factory(new net::URLRequestJobFactory);
+ net::URLRequestJobFactory* new_factory(new net::URLRequestJobFactoryImpl);
new_factory->SetProtocolHandler("http", new IfModifiedSinceJobFactory);
io_thread_->SetNewJobFactory(new_factory);
@@ -2787,7 +2787,7 @@ class AppCacheUpdateJobTest : public testing::Test,
ASSERT_EQ(MessageLoop::TYPE_IO, MessageLoop::current()->type());
HttpHeadersRequestTestJob::Initialize("", "\"LadeDade\"");
- net::URLRequestJobFactory* new_factory(new net::URLRequestJobFactory);
+ net::URLRequestJobFactory* new_factory(new net::URLRequestJobFactoryImpl);
new_factory->SetProtocolHandler("http", new IfModifiedSinceJobFactory);
io_thread_->SetNewJobFactory(new_factory);
@@ -2822,7 +2822,7 @@ class AppCacheUpdateJobTest : public testing::Test,
// Verify that code is correct when building multiple extra headers.
HttpHeadersRequestTestJob::Initialize(
"Sat, 29 Oct 1994 19:43:31 GMT", "\"LadeDade\"");
- net::URLRequestJobFactory* new_factory(new net::URLRequestJobFactory);
+ net::URLRequestJobFactory* new_factory(new net::URLRequestJobFactoryImpl);
new_factory->SetProtocolHandler("http", new IfModifiedSinceJobFactory);
io_thread_->SetNewJobFactory(new_factory);
diff --git a/webkit/fileapi/local_file_system_operation_write_unittest.cc b/webkit/fileapi/local_file_system_operation_write_unittest.cc
index cd1950a..04ac98f 100644
--- a/webkit/fileapi/local_file_system_operation_write_unittest.cc
+++ b/webkit/fileapi/local_file_system_operation_write_unittest.cc
@@ -13,7 +13,7 @@
#include "net/url_request/url_request.h"
#include "net/url_request/url_request_context.h"
#include "net/url_request/url_request_job.h"
-#include "net/url_request/url_request_job_factory.h"
+#include "net/url_request/url_request_job_factory_impl.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "webkit/blob/blob_data.h"
#include "webkit/blob/blob_storage_controller.h"
@@ -192,7 +192,7 @@ class TestURLRequestContext : public net::URLRequestContext {
}
private:
- net::URLRequestJobFactory job_factory_;
+ net::URLRequestJobFactoryImpl job_factory_;
scoped_ptr<webkit_blob::BlobStorageController> blob_storage_controller_;
DISALLOW_COPY_AND_ASSIGN(TestURLRequestContext);
diff --git a/webkit/tools/test_shell/test_shell_request_context.cc b/webkit/tools/test_shell/test_shell_request_context.cc
index 42d73c2..b5b8dd3 100644
--- a/webkit/tools/test_shell/test_shell_request_context.cc
+++ b/webkit/tools/test_shell/test_shell_request_context.cc
@@ -22,7 +22,7 @@
#include "net/proxy/proxy_config_service.h"
#include "net/proxy/proxy_config_service_fixed.h"
#include "net/proxy/proxy_service.h"
-#include "net/url_request/url_request_job_factory.h"
+#include "net/url_request/url_request_job_factory_impl.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebKitPlatformSupport.h"
#include "webkit/blob/blob_storage_controller.h"
@@ -120,7 +120,7 @@ void TestShellRequestContext::Init(
file_system_context_ = static_cast<SimpleFileSystem*>(
WebKit::webKitPlatformSupport()->fileSystem())->file_system_context();
- net::URLRequestJobFactory* job_factory = new net::URLRequestJobFactory;
+ net::URLRequestJobFactory* job_factory = new net::URLRequestJobFactoryImpl();
job_factory->SetProtocolHandler(
"blob",
new webkit_blob::BlobProtocolHandler(