summaryrefslogtreecommitdiffstats
path: root/webkit/tools
diff options
context:
space:
mode:
authormichaeln@google.com <michaeln@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-15 20:00:11 +0000
committermichaeln@google.com <michaeln@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-15 20:00:11 +0000
commit6c270d442c1ee1a526538b8530e6198a9ada90e4 (patch)
tree5e5ccfbcd54cc59bbb250a233cf128df9dac5fab /webkit/tools
parente10d86c2067313fa2cdc8684b5f0904b0d8d985e (diff)
downloadchromium_src-6c270d442c1ee1a526538b8530e6198a9ada90e4.zip
chromium_src-6c270d442c1ee1a526538b8530e6198a9ada90e4.tar.gz
chromium_src-6c270d442c1ee1a526538b8530e6198a9ada90e4.tar.bz2
1) Tell the AppCacheService which request context to use when fetching resources for updates. Done for both chrome and test_shell. The service does not yet take a reference to that context, because the extra reference apparently gives some tests grief.
2) Added methods to generate new storage ids for different object types on the IO thread. BUG=none TEST=none Review URL: http://codereview.chromium.org/195077 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26253 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/tools')
-rw-r--r--webkit/tools/test_shell/simple_appcache_system.cc3
-rw-r--r--webkit/tools/test_shell/simple_appcache_system.h7
-rw-r--r--webkit/tools/test_shell/simple_resource_loader_bridge.cc2
3 files changed, 7 insertions, 5 deletions
diff --git a/webkit/tools/test_shell/simple_appcache_system.cc b/webkit/tools/test_shell/simple_appcache_system.cc
index 5ab7fe2..489579f 100644
--- a/webkit/tools/test_shell/simple_appcache_system.cc
+++ b/webkit/tools/test_shell/simple_appcache_system.cc
@@ -258,7 +258,7 @@ void SimpleAppCacheSystem::InitOnUIThread(
cache_directory_ = cache_directory;
}
-void SimpleAppCacheSystem::InitOnIOThread() {
+void SimpleAppCacheSystem::InitOnIOThread(URLRequestContext* request_context) {
if (!is_initailized_on_ui_thread())
return;
@@ -270,6 +270,7 @@ void SimpleAppCacheSystem::InitOnIOThread() {
service_ = new appcache::AppCacheService();
backend_impl_ = new appcache::AppCacheBackendImpl();
service_->Initialize(cache_directory_);
+ service_->set_request_context(request_context);
backend_impl_->Initialize(service_, frontend_proxy_.get(), kSingleProcessId);
AppCacheInterceptor::EnsureRegistered();
diff --git a/webkit/tools/test_shell/simple_appcache_system.h b/webkit/tools/test_shell/simple_appcache_system.h
index 184842f..c029051 100644
--- a/webkit/tools/test_shell/simple_appcache_system.h
+++ b/webkit/tools/test_shell/simple_appcache_system.h
@@ -19,6 +19,7 @@ class WebApplicationCacheHostClient;
class SimpleBackendProxy;
class SimpleFrontendProxy;
class URLRequest;
+class URLRequestContext;
// A class that composes the constituent parts of an appcache system
// together for use in a single process with two relavant threads,
@@ -43,9 +44,9 @@ class SimpleAppCacheSystem : public MessageLoop::DestructionObserver {
// at a time, but after IO thread termination a new one can be
// started on which this method should be called. The instance
// is assumed to outlive the IO thread.
- static void InitializeOnIOThread() {
+ static void InitializeOnIOThread(URLRequestContext* request_context) {
if (instance_)
- instance_->InitOnIOThread();
+ instance_->InitOnIOThread(request_context);
}
// Called by TestShellWebKitInit to manufacture a 'host' for webcore.
@@ -79,7 +80,7 @@ class SimpleAppCacheSystem : public MessageLoop::DestructionObserver {
// Instance methods called by our static public methods
void InitOnUIThread(const FilePath& cache_directory);
- void InitOnIOThread();
+ void InitOnIOThread(URLRequestContext* request_context);
WebKit::WebApplicationCacheHost* CreateCacheHostForWebKit(
WebKit::WebApplicationCacheHostClient* client);
void SetExtraRequestBits(URLRequest* request,
diff --git a/webkit/tools/test_shell/simple_resource_loader_bridge.cc b/webkit/tools/test_shell/simple_resource_loader_bridge.cc
index 142ab5e..0f1be30 100644
--- a/webkit/tools/test_shell/simple_resource_loader_bridge.cc
+++ b/webkit/tools/test_shell/simple_resource_loader_bridge.cc
@@ -75,7 +75,7 @@ class IOThread : public base::Thread {
}
virtual void Init() {
- SimpleAppCacheSystem::InitializeOnIOThread();
+ SimpleAppCacheSystem::InitializeOnIOThread(request_context);
}
virtual void CleanUp() {