Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(481)

Unified Diff: webkit/glue/webappcachecontext.cc

Issue 9712: AppCachePlumbing (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webkit/glue/webappcachecontext.cc
===================================================================
--- webkit/glue/webappcachecontext.cc (revision 0)
+++ webkit/glue/webappcachecontext.cc (revision 0)
@@ -0,0 +1,41 @@
+// Copyright (c) 2009 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/glue/webappcachecontext.h"
+
+namespace {
+
+WebAppCacheContext::WebAppCacheFactoryProc factory_proc = NULL;
+
+class NoopWebAppCacheContext : public WebAppCacheContext {
+ public:
+ virtual int context_id() { return kNoAppCacheContextId; }
+ virtual int64 app_cache_id() { return kNoAppCacheId; }
+ virtual void Initialize(ContextType context_type,
+ WebAppCacheContext* opt_parent) {}
+ virtual void SelectAppCacheWithoutManifest(
+ const GURL& document_url,
+ int64 cache_document_was_loaded_from) {}
+ virtual void SelectAppCacheWithManifest(
+ const GURL& document_url,
+ int64 cache_document_was_loaded_from,
+ const GURL& manifest_url) {}
+
+};
+
+} // namespace
+
+const int WebAppCacheContext::kNoAppCacheContextId = 0;
+const int64 WebAppCacheContext::kNoAppCacheId = 0;
+const int64 WebAppCacheContext::kUnknownAppCacheId = -1;
+
+WebAppCacheContext* WebAppCacheContext::Create() {
+ if (factory_proc)
+ return factory_proc();
+ return new NoopWebAppCacheContext();
+}
+
+void WebAppCacheContext::SetFactory(WebAppCacheFactoryProc proc) {
+ factory_proc = proc;
+}
Property changes on: webkit\glue\webappcachecontext.cc
___________________________________________________________________
Added: svn:eol-style
+ LF

Powered by Google App Engine
This is Rietveld 408576698