| 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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 } | 97 } |
| 98 | 98 |
| 99 AppCacheStorage* storage() const { return storage_.get(); } | 99 AppCacheStorage* storage() const { return storage_.get(); } |
| 100 | 100 |
| 101 protected: | 101 protected: |
| 102 class AsyncHelper; | 102 class AsyncHelper; |
| 103 class DeleteHelper; | 103 class DeleteHelper; |
| 104 class GetInfoHelper; | 104 class GetInfoHelper; |
| 105 | 105 |
| 106 typedef std::set<AsyncHelper*> PendingAsyncHelpers; | 106 typedef std::set<AsyncHelper*> PendingAsyncHelpers; |
| 107 typedef std::map<int, AppCacheBackendImpl*> BackendMap; |
| 107 | 108 |
| 108 AppCachePolicy* appcache_policy_; | 109 AppCachePolicy* appcache_policy_; |
| 109 | |
| 110 // Deals with persistence. | |
| 111 scoped_ptr<AppCacheStorage> storage_; | 110 scoped_ptr<AppCacheStorage> storage_; |
| 112 | |
| 113 PendingAsyncHelpers pending_helpers_; | 111 PendingAsyncHelpers pending_helpers_; |
| 114 | 112 BackendMap backends_; // One 'backend' per child process. |
| 115 // Track current processes. One 'backend' per child process. | 113 URLRequestContext* request_context_; // Context for use during cache updates. |
| 116 typedef std::map<int, AppCacheBackendImpl*> BackendMap; | |
| 117 BackendMap backends_; | |
| 118 | |
| 119 // Context for use during cache updates. | |
| 120 URLRequestContext* request_context_; | |
| 121 | |
| 122 // TODO(jennb): service state: e.g. reached quota? | |
| 123 | 114 |
| 124 DISALLOW_COPY_AND_ASSIGN(AppCacheService); | 115 DISALLOW_COPY_AND_ASSIGN(AppCacheService); |
| 125 }; | 116 }; |
| 126 | 117 |
| 127 } // namespace appcache | 118 } // namespace appcache |
| 128 | 119 |
| 129 #endif // WEBKIT_APPCACHE_APPCACHE_SERVICE_H_ | 120 #endif // WEBKIT_APPCACHE_APPCACHE_SERVICE_H_ |
| OLD | NEW |