From e16b8af74c13f79282c608042d92fc1000fb5e62 Mon Sep 17 00:00:00 2001 From: "michaeln@google.com" Date: Mon, 21 Mar 2011 22:11:42 +0000 Subject: Plumbing to support loading from the "most appropriate" appcache. BUG=68479 Review URL: http://codereview.chromium.org/6667057 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78934 0039d316-1c4b-4281-b951-d872f2087c98 --- .../worker/worker_webapplicationcachehost_impl.cc | 21 ++++++++++++++++++++- .../worker/worker_webapplicationcachehost_impl.h | 15 +++++++++------ 2 files changed, 29 insertions(+), 7 deletions(-) (limited to 'content/worker') diff --git a/content/worker/worker_webapplicationcachehost_impl.cc b/content/worker/worker_webapplicationcachehost_impl.cc index 45c75ed..734302c 100644 --- a/content/worker/worker_webapplicationcachehost_impl.cc +++ b/content/worker/worker_webapplicationcachehost_impl.cc @@ -21,7 +21,26 @@ WorkerWebApplicationCacheHostImpl::WorkerWebApplicationCacheHostImpl( init_info.parent_appcache_host_id); } +void WorkerWebApplicationCacheHostImpl::willStartMainResourceRequest( + WebKit::WebURLRequest&, const WebKit::WebFrame*) { +} + +void WorkerWebApplicationCacheHostImpl::didReceiveResponseForMainResource( + const WebKit::WebURLResponse&) { +} + +void WorkerWebApplicationCacheHostImpl::didReceiveDataForMainResource( + const char*, int) { +} + +void WorkerWebApplicationCacheHostImpl::didFinishLoadingMainResource( + bool) { +} + +void WorkerWebApplicationCacheHostImpl::selectCacheWithoutManifest() { +} + bool WorkerWebApplicationCacheHostImpl::selectCacheWithManifest( - const WebKit::WebURL& manifestURL) { + const WebKit::WebURL&) { return true; } diff --git a/content/worker/worker_webapplicationcachehost_impl.h b/content/worker/worker_webapplicationcachehost_impl.h index db6dc8a..e356583 100644 --- a/content/worker/worker_webapplicationcachehost_impl.h +++ b/content/worker/worker_webapplicationcachehost_impl.h @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 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. @@ -36,15 +36,18 @@ class WorkerWebApplicationCacheHostImpl // Main resource loading is different for workers. The resource is // loaded by the creator of the worker rather than the worker itself. - virtual void willStartMainResourceRequest(WebKit::WebURLRequest&) {} + // These overrides are stubbed out. + virtual void willStartMainResourceRequest( + WebKit::WebURLRequest&, const WebKit::WebFrame*); virtual void didReceiveResponseForMainResource( - const WebKit::WebURLResponse&) {} - virtual void didReceiveDataForMainResource(const char* data, int len) {} - virtual void didFinishLoadingMainResource(bool success) {} + const WebKit::WebURLResponse&); + virtual void didReceiveDataForMainResource(const char* data, int len); + virtual void didFinishLoadingMainResource(bool success); // Cache selection is also different for workers. We know at construction // time what cache to select and do so then. - virtual void selectCacheWithoutManifest() {} + // These overrides are stubbed out. + virtual void selectCacheWithoutManifest(); virtual bool selectCacheWithManifest(const WebKit::WebURL& manifestURL); }; -- cgit v1.1