OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef WEBKIT_APPCACHE_APPCACHE_STORAGE_IMPL_H_ | 5 #ifndef WEBKIT_APPCACHE_APPCACHE_STORAGE_IMPL_H_ |
6 #define WEBKIT_APPCACHE_APPCACHE_STORAGE_IMPL_H_ | 6 #define WEBKIT_APPCACHE_APPCACHE_STORAGE_IMPL_H_ |
7 | 7 |
8 #include <deque> | 8 #include <deque> |
9 #include <map> | 9 #include <map> |
10 #include <set> | 10 #include <set> |
(...skipping 12 matching lines...) Expand all Loading... |
23 namespace appcache { | 23 namespace appcache { |
24 | 24 |
25 class AppCacheStorageImpl : public AppCacheStorage { | 25 class AppCacheStorageImpl : public AppCacheStorage { |
26 public: | 26 public: |
27 explicit AppCacheStorageImpl(AppCacheService* service); | 27 explicit AppCacheStorageImpl(AppCacheService* service); |
28 virtual ~AppCacheStorageImpl(); | 28 virtual ~AppCacheStorageImpl(); |
29 | 29 |
30 void Initialize(const FilePath& cache_directory, | 30 void Initialize(const FilePath& cache_directory, |
31 base::MessageLoopProxy* db_thread, | 31 base::MessageLoopProxy* db_thread, |
32 base::MessageLoopProxy* cache_thread); | 32 base::MessageLoopProxy* cache_thread); |
33 void Disable(); | 33 APPCACHE_EXPORT void Disable(); |
34 bool is_disabled() const { return is_disabled_; } | 34 bool is_disabled() const { return is_disabled_; } |
35 | 35 |
36 // AppCacheStorage methods, see the base class for doc comments. | 36 // AppCacheStorage methods, see the base class for doc comments. |
37 virtual void GetAllInfo(Delegate* delegate) OVERRIDE; | 37 virtual void GetAllInfo(Delegate* delegate) OVERRIDE; |
38 virtual void LoadCache(int64 id, Delegate* delegate) OVERRIDE; | 38 virtual void LoadCache(int64 id, Delegate* delegate) OVERRIDE; |
39 virtual void LoadOrCreateGroup(const GURL& manifest_url, | 39 virtual void LoadOrCreateGroup(const GURL& manifest_url, |
40 Delegate* delegate) OVERRIDE; | 40 Delegate* delegate) OVERRIDE; |
41 virtual void StoreGroupAndNewestCache(AppCacheGroup* group, | 41 virtual void StoreGroupAndNewestCache(AppCacheGroup* group, |
42 AppCache* newest_cache, | 42 AppCache* newest_cache, |
43 Delegate* delegate) OVERRIDE; | 43 Delegate* delegate) OVERRIDE; |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 // any tasks on the background database thread. | 166 // any tasks on the background database thread. |
167 std::deque<base::Closure> pending_simple_tasks_; | 167 std::deque<base::Closure> pending_simple_tasks_; |
168 base::WeakPtrFactory<AppCacheStorageImpl> weak_factory_; | 168 base::WeakPtrFactory<AppCacheStorageImpl> weak_factory_; |
169 | 169 |
170 friend class ChromeAppCacheServiceTest; | 170 friend class ChromeAppCacheServiceTest; |
171 }; | 171 }; |
172 | 172 |
173 } // namespace appcache | 173 } // namespace appcache |
174 | 174 |
175 #endif // WEBKIT_APPCACHE_APPCACHE_STORAGE_IMPL_H_ | 175 #endif // WEBKIT_APPCACHE_APPCACHE_STORAGE_IMPL_H_ |
OLD | NEW |