summaryrefslogtreecommitdiffstats
path: root/webkit/appcache/appcache_backend_impl.cc
diff options
context:
space:
mode:
authormichaeln@google.com <michaeln@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-21 21:46:31 +0000
committermichaeln@google.com <michaeln@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-21 21:46:31 +0000
commitf430b57130adff68db69f340c68b6afe5746edc5 (patch)
tree3c1e56173a34f7ea652ebe6c450c22ba9ddce0ae /webkit/appcache/appcache_backend_impl.cc
parent8177d9bbcda50fdba18f19f131024a4704c376f8 (diff)
downloadchromium_src-f430b57130adff68db69f340c68b6afe5746edc5.zip
chromium_src-f430b57130adff68db69f340c68b6afe5746edc5.tar.gz
chromium_src-f430b57130adff68db69f340c68b6afe5746edc5.tar.bz2
Retrofit the pre-existing appache message dispatching with the new WebKit APIs and concrete classes defined in our new appcache library, and get rid of the old files.
There are many files in the CL, mostly to pickup constant values now defined in our new appcache library, and to reflect a terminilogy change (from 'context' to 'host'). TEST=some existing unit tests apply BUG=none Review URL: http://codereview.chromium.org/170003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24022 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/appcache/appcache_backend_impl.cc')
-rw-r--r--webkit/appcache/appcache_backend_impl.cc63
1 files changed, 63 insertions, 0 deletions
diff --git a/webkit/appcache/appcache_backend_impl.cc b/webkit/appcache/appcache_backend_impl.cc
new file mode 100644
index 0000000..c59fc6d
--- /dev/null
+++ b/webkit/appcache/appcache_backend_impl.cc
@@ -0,0 +1,63 @@
+// Copyright (c) 2006-2008 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.
+
+#include "webkit/appcache/appcache_backend_impl.h"
+
+#include "base/logging.h"
+#include "webkit/appcache/web_application_cache_host_impl.h"
+
+namespace appcache {
+
+AppCacheBackendImpl::~AppCacheBackendImpl() {
+ // TODO(michaeln): if (service_) service_->UnregisterFrontend(frontend_);
+}
+
+void AppCacheBackendImpl::Initialize(AppCacheService* service,
+ AppCacheFrontend* frontend) {
+ DCHECK(!service_ && !frontend_ && frontend); // DCHECK(service)
+ service_ = service;
+ frontend_ = frontend;
+ // TODO(michaeln): service_->RegisterFrontend(frontend_);
+}
+
+void AppCacheBackendImpl::RegisterHost(int host_id) {
+ // TODO(michaeln): plumb to service
+}
+
+void AppCacheBackendImpl::UnregisterHost(int host_id) {
+ // TODO(michaeln): plumb to service
+}
+
+void AppCacheBackendImpl::SelectCache(
+ int host_id,
+ const GURL& document_url,
+ const int64 cache_document_was_loaded_from,
+ const GURL& manifest_url) {
+ // TODO(michaeln): plumb to service
+ frontend_->OnCacheSelected(host_id, kNoCacheId, UNCACHED);
+}
+
+void AppCacheBackendImpl::MarkAsForeignEntry(
+ int host_id,
+ const GURL& document_url,
+ int64 cache_document_was_loaded_from) {
+ // TODO(michaeln): plumb to service
+}
+
+Status AppCacheBackendImpl::GetStatus(int host_id) {
+ // TODO(michaeln): plumb to service
+ return UNCACHED;
+}
+
+bool AppCacheBackendImpl::StartUpdate(int host_id) {
+ // TODO(michaeln): plumb to service
+ return false;
+}
+
+bool AppCacheBackendImpl::SwapCache(int host_id) {
+ // TODO(michaeln): plumb to service
+ return false;
+}
+
+} // namespace appcache \ No newline at end of file