summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-09 21:53:21 +0000
committerdarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-09 21:53:21 +0000
commitc98b9a946bff0910e1070dac51a3197dd926959e (patch)
treec978ecdb931a5c5d09121ea0296dcbd3ffa1126c
parent76925134ff272a3129ca38b740ed0637111f56f4 (diff)
downloadchromium_src-c98b9a946bff0910e1070dac51a3197dd926959e.zip
chromium_src-c98b9a946bff0910e1070dac51a3197dd926959e.tar.gz
chromium_src-c98b9a946bff0910e1070dac51a3197dd926959e.tar.bz2
Update WebKit to r44544.
1- WorkerThread::create() now takes a WorkerLoaderProxy parameter, which I implemented in a stub fashion on WebWorkerImpl. I'm sure the WebWorker guys will fix this up properly. 2- Removed expirationDate and setExpirationDate members of WebURLResponse consistent with their removal from WebCore::ResourceResponseBase. The corresponding logic for computing cache eviction time is now part of WebCore. 3- Added wtf/DateMath.{h,cpp} to the build. TEST=covered by existing tests, I hope! BUG=none R=eroman Review URL: http://codereview.chromium.org/119387 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17983 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--DEPS2
-rw-r--r--webkit/api/public/WebURLResponse.h3
-rw-r--r--webkit/api/src/WebURLResponse.cpp10
-rw-r--r--webkit/glue/weburlloader_impl.cc16
-rw-r--r--webkit/glue/webworker_impl.cc16
-rw-r--r--webkit/glue/webworker_impl.h9
-rw-r--r--webkit/glue/webworkerclient_impl.cc2
-rw-r--r--webkit/webkit.gyp2
8 files changed, 28 insertions, 32 deletions
diff --git a/DEPS b/DEPS
index 2da94e1..c2497c4 100644
--- a/DEPS
+++ b/DEPS
@@ -1,7 +1,7 @@
vars = {
"webkit_trunk":
"http://svn.webkit.org/repository/webkit/trunk",
- "webkit_revision": "44438",
+ "webkit_revision": "44544",
}
diff --git a/webkit/api/public/WebURLResponse.h b/webkit/api/public/WebURLResponse.h
index 2e1429f..2fb51b2 100644
--- a/webkit/api/public/WebURLResponse.h
+++ b/webkit/api/public/WebURLResponse.h
@@ -91,9 +91,6 @@ namespace WebKit {
WEBKIT_API void clearHTTPHeaderField(const WebString& name);
WEBKIT_API void visitHTTPHeaderFields(WebHTTPHeaderVisitor*) const;
- WEBKIT_API double expirationDate() const;
- WEBKIT_API void setExpirationDate(double);
-
WEBKIT_API double lastModifiedDate() const;
WEBKIT_API void setLastModifiedDate(double);
diff --git a/webkit/api/src/WebURLResponse.cpp b/webkit/api/src/WebURLResponse.cpp
index 64c9463..8b6f604 100644
--- a/webkit/api/src/WebURLResponse.cpp
+++ b/webkit/api/src/WebURLResponse.cpp
@@ -182,16 +182,6 @@ void WebURLResponse::visitHTTPHeaderFields(WebHTTPHeaderVisitor* visitor) const
visitor->visitHeader(String(it->first), it->second);
}
-double WebURLResponse::expirationDate() const
-{
- return static_cast<double>(m_private->m_resourceResponse->expirationDate());
-}
-
-void WebURLResponse::setExpirationDate(double expirationDate)
-{
- m_private->m_resourceResponse->setExpirationDate(static_cast<time_t>(expirationDate));
-}
-
double WebURLResponse::lastModifiedDate() const
{
return static_cast<double>(m_private->m_resourceResponse->lastModifiedDate());
diff --git a/webkit/glue/weburlloader_impl.cc b/webkit/glue/weburlloader_impl.cc
index 1780014..df8f077 100644
--- a/webkit/glue/weburlloader_impl.cc
+++ b/webkit/glue/weburlloader_impl.cc
@@ -169,22 +169,6 @@ void PopulateURLResponse(
if (headers->GetLastModifiedValue(&time_val))
response->setLastModifiedDate(time_val.ToDoubleT());
- // Compute expiration date
- TimeDelta freshness_lifetime =
- headers->GetFreshnessLifetime(info.response_time);
- if (freshness_lifetime != TimeDelta()) {
- Time now = Time::Now();
- TimeDelta current_age =
- headers->GetCurrentAge(info.request_time, info.response_time, now);
- time_val = now + freshness_lifetime - current_age;
-
- response->setExpirationDate(time_val.ToDoubleT());
- } else {
- // WebKit uses 0 as a special expiration date that means never expire.
- // 1 is a small enough value to let it always expire.
- response->setExpirationDate(1);
- }
-
// Build up the header map.
void* iter = NULL;
std::string name;
diff --git a/webkit/glue/webworker_impl.cc b/webkit/glue/webworker_impl.cc
index a4977dc..9d155ed 100644
--- a/webkit/glue/webworker_impl.cc
+++ b/webkit/glue/webworker_impl.cc
@@ -85,7 +85,8 @@ void WebWorkerImpl::startWorkerContext(const WebURL& script_url,
webkit_glue::WebURLToKURL(script_url),
webkit_glue::WebStringToString(user_agent),
webkit_glue::WebStringToString(source_code),
- this);
+ *this,
+ *this);
// Worker initialization means a pending activity.
reportPendingActivity(true);
@@ -230,6 +231,19 @@ void WebWorkerImpl::workerContextDestroyed() {
this));
}
+// WorkerLoaderProxy -----------------------------------------------------------
+
+void WebWorkerImpl::postTaskToLoader(
+ PassRefPtr<WebCore::ScriptExecutionContext::Task> task) {
+ NOTIMPLEMENTED();
+}
+
+void WebWorkerImpl::postTaskForModeToWorkerContext(
+ PassRefPtr<WebCore::ScriptExecutionContext::Task> task,
+ const WebCore::String& mode) {
+ NOTIMPLEMENTED();
+}
+
void WebWorkerImpl::WorkerContextDestroyedTask(
WebCore::ScriptExecutionContext* context,
WebWorkerImpl* this_ptr) {
diff --git a/webkit/glue/webworker_impl.h b/webkit/glue/webworker_impl.h
index 56ad124..8c87d48 100644
--- a/webkit/glue/webworker_impl.h
+++ b/webkit/glue/webworker_impl.h
@@ -10,6 +10,7 @@
#if ENABLE(WORKERS)
#include "ScriptExecutionContext.h"
+#include "WorkerLoaderProxy.h"
#include "WorkerObjectProxy.h"
#include <wtf/RefPtr.h>
@@ -24,6 +25,7 @@ class WorkerThread;
// WebCore::WorkerObjectProxy, this class will conver to Chrome data types first
// and then call the supplied WebWorkerClient.
class WebWorkerImpl: public WebCore::WorkerObjectProxy,
+ public WebCore::WorkerLoaderProxy,
public WebKit::WebWorker {
public:
explicit WebWorkerImpl(WebKit::WebWorkerClient* client);
@@ -45,6 +47,13 @@ class WebWorkerImpl: public WebCore::WorkerObjectProxy,
virtual void reportPendingActivity(bool has_pending_activity);
virtual void workerContextDestroyed();
+ // WebCore::WorkerLoaderProxy methods:
+ virtual void postTaskToLoader(
+ WTF::PassRefPtr<WebCore::ScriptExecutionContext::Task>);
+ virtual void postTaskForModeToWorkerContext(
+ WTF::PassRefPtr<WebCore::ScriptExecutionContext::Task>,
+ const WebCore::String& mode);
+
// WebWorker methods:
virtual void startWorkerContext(const WebKit::WebURL& script_url,
const WebKit::WebString& user_agent,
diff --git a/webkit/glue/webworkerclient_impl.cc b/webkit/glue/webworkerclient_impl.cc
index 5e5cf23..b0db8a0 100644
--- a/webkit/glue/webworkerclient_impl.cc
+++ b/webkit/glue/webworkerclient_impl.cc
@@ -82,7 +82,7 @@ WebCore::WorkerContextProxy* WebCore::WorkerContextProxy::create(
}
WebCore::WorkerObjectProxy* worker_object_proxy =
- current_context->workerContext()->thread()->workerObjectProxy();
+ &current_context->workerContext()->thread()->workerObjectProxy();
WebWorkerImpl* impl = reinterpret_cast<WebWorkerImpl*>(worker_object_proxy);
webworker = impl->client()->createWorker(proxy);
}
diff --git a/webkit/webkit.gyp b/webkit/webkit.gyp
index c7a1001..fe1d0af 100644
--- a/webkit/webkit.gyp
+++ b/webkit/webkit.gyp
@@ -250,6 +250,8 @@
'../third_party/WebKit/JavaScriptCore/wtf/ByteArray.h',
'../third_party/WebKit/JavaScriptCore/wtf/CurrentTime.h',
'../third_party/WebKit/JavaScriptCore/wtf/CrossThreadRefCounted.h',
+ '../third_party/WebKit/JavaScriptCore/wtf/DateMath.cpp',
+ '../third_party/WebKit/JavaScriptCore/wtf/DateMath.h',
'../third_party/WebKit/JavaScriptCore/wtf/Deque.h',
'../third_party/WebKit/JavaScriptCore/wtf/DisallowCType.h',
'../third_party/WebKit/JavaScriptCore/wtf/FastMalloc.cpp',