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_BROWSER_APPCACHE_APPCACHE_H_ | 5 #ifndef WEBKIT_BROWSER_APPCACHE_APPCACHE_H_ |
6 #define WEBKIT_BROWSER_APPCACHE_APPCACHE_H_ | 6 #define WEBKIT_BROWSER_APPCACHE_APPCACHE_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/gtest_prod_util.h" | 12 #include "base/gtest_prod_util.h" |
13 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
14 #include "base/time.h" | 14 #include "base/time.h" |
15 #include "googleurl/src/gurl.h" | 15 #include "googleurl/src/gurl.h" |
16 #include "webkit/browser/appcache/appcache_database.h" | 16 #include "webkit/browser/appcache/appcache_database.h" |
17 #include "webkit/browser/appcache/appcache_entry.h" | 17 #include "webkit/browser/appcache/appcache_entry.h" |
18 #include "webkit/browser/appcache/manifest_parser.h" | 18 #include "webkit/browser/appcache/manifest_parser.h" |
19 #include "webkit/storage/webkit_storage_export.h" | 19 #include "webkit/browser/webkit_storage_browser_export.h" |
20 | 20 |
21 namespace appcache { | 21 namespace appcache { |
22 | 22 |
23 class AppCacheGroup; | 23 class AppCacheGroup; |
24 class AppCacheHost; | 24 class AppCacheHost; |
25 class AppCacheStorage; | 25 class AppCacheStorage; |
26 | 26 |
27 // Set of cached resources for an application. A cache exists as long as a | 27 // Set of cached resources for an application. A cache exists as long as a |
28 // host is associated with it, the cache is in an appcache group or the | 28 // host is associated with it, the cache is in an appcache group or the |
29 // cache is being created during an appcache upate. | 29 // cache is being created during an appcache upate. |
30 class WEBKIT_STORAGE_EXPORT AppCache : public base::RefCounted<AppCache> { | 30 class WEBKIT_STORAGE_BROWSER_EXPORT AppCache |
| 31 : public base::RefCounted<AppCache> { |
31 public: | 32 public: |
32 typedef std::map<GURL, AppCacheEntry> EntryMap; | 33 typedef std::map<GURL, AppCacheEntry> EntryMap; |
33 typedef std::set<AppCacheHost*> AppCacheHosts; | 34 typedef std::set<AppCacheHost*> AppCacheHosts; |
34 | 35 |
35 AppCache(AppCacheStorage* storage, int64 cache_id); | 36 AppCache(AppCacheStorage* storage, int64 cache_id); |
36 | 37 |
37 int64 cache_id() const { return cache_id_; } | 38 int64 cache_id() const { return cache_id_; } |
38 | 39 |
39 AppCacheGroup* owning_group() const { return owning_group_.get(); } | 40 AppCacheGroup* owning_group() const { return owning_group_.get(); } |
40 | 41 |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 AppCacheStorage* storage_; | 176 AppCacheStorage* storage_; |
176 | 177 |
177 FRIEND_TEST_ALL_PREFIXES(AppCacheTest, InitializeWithManifest); | 178 FRIEND_TEST_ALL_PREFIXES(AppCacheTest, InitializeWithManifest); |
178 FRIEND_TEST_ALL_PREFIXES(AppCacheTest, ToFromDatabaseRecords); | 179 FRIEND_TEST_ALL_PREFIXES(AppCacheTest, ToFromDatabaseRecords); |
179 DISALLOW_COPY_AND_ASSIGN(AppCache); | 180 DISALLOW_COPY_AND_ASSIGN(AppCache); |
180 }; | 181 }; |
181 | 182 |
182 } // namespace appcache | 183 } // namespace appcache |
183 | 184 |
184 #endif // WEBKIT_BROWSER_APPCACHE_APPCACHE_H_ | 185 #endif // WEBKIT_BROWSER_APPCACHE_APPCACHE_H_ |
OLD | NEW |