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_DISK_CACHE_H_ | 5 #ifndef WEBKIT_APPCACHE_APPCACHE_DISK_CACHE_H_ |
6 #define WEBKIT_APPCACHE_APPCACHE_DISK_CACHE_H_ | 6 #define WEBKIT_APPCACHE_APPCACHE_DISK_CACHE_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 20 matching lines...) Expand all Loading... |
31 | 31 |
32 // Initializes the object to use memory only storage. | 32 // Initializes the object to use memory only storage. |
33 // This is used for Chrome's incognito browsing. | 33 // This is used for Chrome's incognito browsing. |
34 int InitWithMemBackend(int disk_cache_size, | 34 int InitWithMemBackend(int disk_cache_size, |
35 net::OldCompletionCallback* callback); | 35 net::OldCompletionCallback* callback); |
36 | 36 |
37 void Disable(); | 37 void Disable(); |
38 bool is_disabled() const { return is_disabled_; } | 38 bool is_disabled() const { return is_disabled_; } |
39 | 39 |
40 virtual int CreateEntry(int64 key, Entry** entry, | 40 virtual int CreateEntry(int64 key, Entry** entry, |
41 net::OldCompletionCallback* callback); | 41 net::OldCompletionCallback* callback) OVERRIDE; |
42 virtual int OpenEntry(int64 key, Entry** entry, | 42 virtual int OpenEntry(int64 key, Entry** entry, |
43 net::OldCompletionCallback* callback); | 43 net::OldCompletionCallback* callback) OVERRIDE; |
44 virtual int DoomEntry(int64 key, net::OldCompletionCallback* callback); | 44 virtual int DoomEntry(int64 key, |
| 45 net::OldCompletionCallback* callback) OVERRIDE; |
45 | 46 |
46 private: | 47 private: |
47 class EntryImpl; | 48 class EntryImpl; |
48 | 49 |
49 class CreateBackendCallback | 50 class CreateBackendCallback |
50 : public net::CancelableOldCompletionCallback<AppCacheDiskCache> { | 51 : public net::CancelableOldCompletionCallback<AppCacheDiskCache> { |
51 public: | 52 public: |
52 typedef net::CancelableOldCompletionCallback<AppCacheDiskCache> BaseClass; | 53 typedef net::CancelableOldCompletionCallback<AppCacheDiskCache> BaseClass; |
53 CreateBackendCallback(AppCacheDiskCache* object, | 54 CreateBackendCallback(AppCacheDiskCache* object, |
54 void (AppCacheDiskCache::* method)(int)) | 55 void (AppCacheDiskCache::* method)(int)) |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 scoped_refptr<CreateBackendCallback> create_backend_callback_; | 105 scoped_refptr<CreateBackendCallback> create_backend_callback_; |
105 PendingCalls pending_calls_; | 106 PendingCalls pending_calls_; |
106 ActiveCalls active_calls_; | 107 ActiveCalls active_calls_; |
107 scoped_ptr<disk_cache::Backend> disk_cache_; | 108 scoped_ptr<disk_cache::Backend> disk_cache_; |
108 }; | 109 }; |
109 | 110 |
110 } // namespace appcache | 111 } // namespace appcache |
111 | 112 |
112 #endif // WEBKIT_APPCACHE_APPCACHE_DISK_CACHE_H_ | 113 #endif // WEBKIT_APPCACHE_APPCACHE_DISK_CACHE_H_ |
113 | 114 |
OLD | NEW |