OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_H_ | 5 #ifndef WEBKIT_APPCACHE_APPCACHE_STORAGE_H_ |
6 #define WEBKIT_APPCACHE_APPCACHE_STORAGE_H_ | 6 #define WEBKIT_APPCACHE_APPCACHE_STORAGE_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
| 11 #include "base/basictypes.h" |
11 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
12 #include "base/basictypes.h" | |
13 #include "base/gtest_prod_util.h" | 13 #include "base/gtest_prod_util.h" |
14 #include "base/memory/ref_counted.h" | 14 #include "base/memory/ref_counted.h" |
15 #include "base/memory/scoped_ptr.h" | 15 #include "base/memory/scoped_ptr.h" |
16 #include "net/base/completion_callback.h" | 16 #include "net/base/completion_callback.h" |
17 #include "webkit/appcache/appcache_export.h" | |
18 #include "webkit/appcache/appcache_working_set.h" | 17 #include "webkit/appcache/appcache_working_set.h" |
| 18 #include "webkit/storage/webkit_storage_export.h" |
19 | 19 |
20 class GURL; | 20 class GURL; |
21 | 21 |
22 namespace appcache { | 22 namespace appcache { |
23 | 23 |
24 class AppCache; | 24 class AppCache; |
25 class AppCacheEntry; | 25 class AppCacheEntry; |
26 class AppCacheGroup; | 26 class AppCacheGroup; |
27 class AppCacheResponseReader; | 27 class AppCacheResponseReader; |
28 class AppCacheResponseWriter; | 28 class AppCacheResponseWriter; |
29 class AppCacheService; | 29 class AppCacheService; |
30 struct AppCacheInfoCollection; | 30 struct AppCacheInfoCollection; |
31 struct HttpResponseInfoIOBuffer; | 31 struct HttpResponseInfoIOBuffer; |
32 | 32 |
33 class APPCACHE_EXPORT AppCacheStorage { | 33 class WEBKIT_STORAGE_EXPORT AppCacheStorage { |
34 public: | 34 public: |
35 typedef std::map<GURL, int64> UsageMap; | 35 typedef std::map<GURL, int64> UsageMap; |
36 | 36 |
37 class APPCACHE_EXPORT Delegate { | 37 class WEBKIT_STORAGE_EXPORT Delegate { |
38 public: | 38 public: |
39 // If retrieval fails, 'collection' will be NULL. | 39 // If retrieval fails, 'collection' will be NULL. |
40 virtual void OnAllInfo(AppCacheInfoCollection* collection) {} | 40 virtual void OnAllInfo(AppCacheInfoCollection* collection) {} |
41 | 41 |
42 // If a load fails the 'cache' will be NULL. | 42 // If a load fails the 'cache' will be NULL. |
43 virtual void OnCacheLoaded(AppCache* cache, int64 cache_id) {} | 43 virtual void OnCacheLoaded(AppCache* cache, int64 cache_id) {} |
44 | 44 |
45 // If a load fails the 'group' will be NULL. | 45 // If a load fails the 'group' will be NULL. |
46 virtual void OnGroupLoaded( | 46 virtual void OnGroupLoaded( |
47 AppCacheGroup* group, const GURL& manifest_url) {} | 47 AppCacheGroup* group, const GURL& manifest_url) {} |
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
313 FRIEND_TEST_ALL_PREFIXES(AppCacheStorageTest, DelegateReferences); | 313 FRIEND_TEST_ALL_PREFIXES(AppCacheStorageTest, DelegateReferences); |
314 FRIEND_TEST_ALL_PREFIXES(AppCacheStorageTest, UsageMap); | 314 FRIEND_TEST_ALL_PREFIXES(AppCacheStorageTest, UsageMap); |
315 | 315 |
316 DISALLOW_COPY_AND_ASSIGN(AppCacheStorage); | 316 DISALLOW_COPY_AND_ASSIGN(AppCacheStorage); |
317 }; | 317 }; |
318 | 318 |
319 } // namespace appcache | 319 } // namespace appcache |
320 | 320 |
321 #endif // WEBKIT_APPCACHE_APPCACHE_STORAGE_H_ | 321 #endif // WEBKIT_APPCACHE_APPCACHE_STORAGE_H_ |
322 | 322 |
OLD | NEW |