| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_SERVICE_H_ | 5 #ifndef WEBKIT_APPCACHE_APPCACHE_SERVICE_H_ |
| 6 #define WEBKIT_APPCACHE_APPCACHE_SERVICE_H_ | 6 #define WEBKIT_APPCACHE_APPCACHE_SERVICE_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 | 10 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 } | 25 } |
| 26 | 26 |
| 27 namespace appcache { | 27 namespace appcache { |
| 28 | 28 |
| 29 class AppCacheBackendImpl; | 29 class AppCacheBackendImpl; |
| 30 class AppCachePolicy; | 30 class AppCachePolicy; |
| 31 | 31 |
| 32 // Refcounted container to avoid copying the collection in callbacks. | 32 // Refcounted container to avoid copying the collection in callbacks. |
| 33 struct AppCacheInfoCollection | 33 struct AppCacheInfoCollection |
| 34 : public base::RefCountedThreadSafe<AppCacheInfoCollection> { | 34 : public base::RefCountedThreadSafe<AppCacheInfoCollection> { |
| 35 virtual ~AppCacheInfoCollection() {} | 35 AppCacheInfoCollection(); |
| 36 virtual ~AppCacheInfoCollection(); |
| 37 |
| 36 std::map<GURL, AppCacheInfoVector> infos_by_origin; | 38 std::map<GURL, AppCacheInfoVector> infos_by_origin; |
| 37 }; | 39 }; |
| 38 | 40 |
| 39 // Class that manages the application cache service. Sends notifications | 41 // Class that manages the application cache service. Sends notifications |
| 40 // to many frontends. One instance per user-profile. Each instance has | 42 // to many frontends. One instance per user-profile. Each instance has |
| 41 // exclusive access to it's cache_directory on disk. | 43 // exclusive access to it's cache_directory on disk. |
| 42 class AppCacheService { | 44 class AppCacheService { |
| 43 public: | 45 public: |
| 44 AppCacheService(); | 46 AppCacheService(); |
| 45 virtual ~AppCacheService(); | 47 virtual ~AppCacheService(); |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 URLRequestContext* request_context_; | 120 URLRequestContext* request_context_; |
| 119 | 121 |
| 120 // TODO(jennb): service state: e.g. reached quota? | 122 // TODO(jennb): service state: e.g. reached quota? |
| 121 | 123 |
| 122 DISALLOW_COPY_AND_ASSIGN(AppCacheService); | 124 DISALLOW_COPY_AND_ASSIGN(AppCacheService); |
| 123 }; | 125 }; |
| 124 | 126 |
| 125 } // namespace appcache | 127 } // namespace appcache |
| 126 | 128 |
| 127 #endif // WEBKIT_APPCACHE_APPCACHE_SERVICE_H_ | 129 #endif // WEBKIT_APPCACHE_APPCACHE_SERVICE_H_ |
| OLD | NEW |