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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "webkit/glue/webappcachecontext.h"
6
7 namespace {
8
9 WebAppCacheContext::WebAppCacheFactoryProc factory_proc = NULL;
10
11 class NoopWebAppCacheContext : public WebAppCacheContext {
12 public:
13 virtual int context_id() { return kNoAppCacheContextId; }
14 virtual int64 app_cache_id() { return kNoAppCacheId; }
15 virtual void Initialize(ContextType context_type,
16 WebAppCacheContext* opt_parent) {}
17 virtual void SelectAppCacheWithoutManifest(
18 const GURL& document_url,
19 int64 cache_document_was_loaded_from) {}
20 virtual void SelectAppCacheWithManifest(
21 const GURL& document_url,
22 int64 cache_document_was_loaded_from,
23 const GURL& manifest_url) {}
24
25 };
26
27 } // namespace
28
29 const int WebAppCacheContext::kNoAppCacheContextId = 0;
30 const int64 WebAppCacheContext::kNoAppCacheId = 0;
31 const int64 WebAppCacheContext::kUnknownAppCacheId = -1;
32
33 WebAppCacheContext* WebAppCacheContext::Create() {
34 if (factory_proc)
35 return factory_proc();
36 return new NoopWebAppCacheContext();
37 }
38
39 void WebAppCacheContext::SetFactory(WebAppCacheFactoryProc proc) {
40 factory_proc = proc;
41 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698