| 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_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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 // Deletes the group identified by 'manifest_url', 'callback' is | 83 // Deletes the group identified by 'manifest_url', 'callback' is |
| 84 // invoked upon completion. Upon completion, the cache group and | 84 // invoked upon completion. Upon completion, the cache group and |
| 85 // any resources within the group are no longer loadable and all | 85 // any resources within the group are no longer loadable and all |
| 86 // subresource loads for pages associated with a deleted group | 86 // subresource loads for pages associated with a deleted group |
| 87 // will fail. This method always completes asynchronously. | 87 // will fail. This method always completes asynchronously. |
| 88 void DeleteAppCacheGroup(const GURL& manifest_url, | 88 void DeleteAppCacheGroup(const GURL& manifest_url, |
| 89 const net::CompletionCallback& callback); | 89 const net::CompletionCallback& callback); |
| 90 | 90 |
| 91 // Deletes all appcaches for the origin, 'callback' is invoked upon | 91 // Deletes all appcaches for the origin, 'callback' is invoked upon |
| 92 // completion. This method always completes asynchronously. | 92 // completion. This method always completes asynchronously. |
| 93 // (virtual for unittesting) | 93 // (virtual for unit testing) |
| 94 virtual void DeleteAppCachesForOrigin(const GURL& origin, | 94 virtual void DeleteAppCachesForOrigin( |
| 95 net::OldCompletionCallback* callback); | 95 const GURL& origin, const net::CompletionCallback& callback); |
| 96 | 96 |
| 97 // Checks the integrity of 'response_id' by reading the headers and data. | 97 // Checks the integrity of 'response_id' by reading the headers and data. |
| 98 // If it cannot be read, the cache group for 'manifest_url' is deleted. | 98 // If it cannot be read, the cache group for 'manifest_url' is deleted. |
| 99 void CheckAppCacheResponse(const GURL& manifest_url_, int64 cache_id, | 99 void CheckAppCacheResponse(const GURL& manifest_url_, int64 cache_id, |
| 100 int64 response_id); | 100 int64 response_id); |
| 101 | 101 |
| 102 // Context for use during cache updates, should only be accessed | 102 // Context for use during cache updates, should only be accessed |
| 103 // on the IO thread. We do NOT add a reference to the request context, | 103 // on the IO thread. We do NOT add a reference to the request context, |
| 104 // it is the callers responsibility to ensure that the pointer | 104 // it is the callers responsibility to ensure that the pointer |
| 105 // remains valid while set. | 105 // remains valid while set. |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 // Context for use during cache updates. | 171 // Context for use during cache updates. |
| 172 net::URLRequestContext* request_context_; | 172 net::URLRequestContext* request_context_; |
| 173 bool clear_local_state_on_exit_; | 173 bool clear_local_state_on_exit_; |
| 174 | 174 |
| 175 DISALLOW_COPY_AND_ASSIGN(AppCacheService); | 175 DISALLOW_COPY_AND_ASSIGN(AppCacheService); |
| 176 }; | 176 }; |
| 177 | 177 |
| 178 } // namespace appcache | 178 } // namespace appcache |
| 179 | 179 |
| 180 #endif // WEBKIT_APPCACHE_APPCACHE_SERVICE_H_ | 180 #endif // WEBKIT_APPCACHE_APPCACHE_SERVICE_H_ |
| OLD | NEW |