OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 CONTENT_BROWSER_APPCACHE_APPCACHE_SERVICE_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_APPCACHE_APPCACHE_SERVICE_IMPL_H_ |
6 #define CONTENT_BROWSER_APPCACHE_APPCACHE_SERVICE_IMPL_H_ | 6 #define CONTENT_BROWSER_APPCACHE_APPCACHE_SERVICE_IMPL_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 | 10 |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 } | 95 } |
96 | 96 |
97 // For use in catastrophic failure modes to reboot the appcache system | 97 // For use in catastrophic failure modes to reboot the appcache system |
98 // without relaunching the browser. | 98 // without relaunching the browser. |
99 void ScheduleReinitialize(); | 99 void ScheduleReinitialize(); |
100 | 100 |
101 // AppCacheService implementation: | 101 // AppCacheService implementation: |
102 virtual void CanHandleMainResourceOffline( | 102 virtual void CanHandleMainResourceOffline( |
103 const GURL& url, | 103 const GURL& url, |
104 const GURL& first_party, | 104 const GURL& first_party, |
105 const net::CompletionCallback& callback) OVERRIDE; | 105 const net::CompletionCallback& callback) override; |
106 virtual void GetAllAppCacheInfo( | 106 virtual void GetAllAppCacheInfo( |
107 AppCacheInfoCollection* collection, | 107 AppCacheInfoCollection* collection, |
108 const net::CompletionCallback& callback) OVERRIDE; | 108 const net::CompletionCallback& callback) override; |
109 virtual void DeleteAppCacheGroup( | 109 virtual void DeleteAppCacheGroup( |
110 const GURL& manifest_url, | 110 const GURL& manifest_url, |
111 const net::CompletionCallback& callback) OVERRIDE; | 111 const net::CompletionCallback& callback) override; |
112 | 112 |
113 // Deletes all appcaches for the origin, 'callback' is invoked upon | 113 // Deletes all appcaches for the origin, 'callback' is invoked upon |
114 // completion. This method always completes asynchronously. | 114 // completion. This method always completes asynchronously. |
115 // (virtual for unit testing) | 115 // (virtual for unit testing) |
116 virtual void DeleteAppCachesForOrigin( | 116 virtual void DeleteAppCachesForOrigin( |
117 const GURL& origin, const net::CompletionCallback& callback); | 117 const GURL& origin, const net::CompletionCallback& callback); |
118 | 118 |
119 // Checks the integrity of 'response_id' by reading the headers and data. | 119 // Checks the integrity of 'response_id' by reading the headers and data. |
120 // If it cannot be read, the cache group for 'manifest_url' is deleted. | 120 // If it cannot be read, the cache group for 'manifest_url' is deleted. |
121 void CheckAppCacheResponse(const GURL& manifest_url, int64 cache_id, | 121 void CheckAppCacheResponse(const GURL& manifest_url, int64 cache_id, |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
215 base::TimeDelta next_reinit_delay_; | 215 base::TimeDelta next_reinit_delay_; |
216 base::OneShotTimer<AppCacheServiceImpl> reinit_timer_; | 216 base::OneShotTimer<AppCacheServiceImpl> reinit_timer_; |
217 ObserverList<Observer> observers_; | 217 ObserverList<Observer> observers_; |
218 | 218 |
219 DISALLOW_COPY_AND_ASSIGN(AppCacheServiceImpl); | 219 DISALLOW_COPY_AND_ASSIGN(AppCacheServiceImpl); |
220 }; | 220 }; |
221 | 221 |
222 } // namespace content | 222 } // namespace content |
223 | 223 |
224 #endif // CONTENT_BROWSER_APPCACHE_APPCACHE_SERVICE_IMPL_H_ | 224 #endif // CONTENT_BROWSER_APPCACHE_APPCACHE_SERVICE_IMPL_H_ |
OLD | NEW |