| 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 <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 class CreateBackendCallback | 50 class CreateBackendCallback |
| 51 : public net::CancelableCompletionCallback<AppCacheDiskCache> { | 51 : public net::CancelableCompletionCallback<AppCacheDiskCache> { |
| 52 public: | 52 public: |
| 53 typedef net::CancelableCompletionCallback<AppCacheDiskCache> BaseClass; | 53 typedef net::CancelableCompletionCallback<AppCacheDiskCache> BaseClass; |
| 54 CreateBackendCallback(AppCacheDiskCache* object, | 54 CreateBackendCallback(AppCacheDiskCache* object, |
| 55 void (AppCacheDiskCache::* method)(int)) | 55 void (AppCacheDiskCache::* method)(int)) |
| 56 : BaseClass(object, method), backend_ptr_(NULL) {} | 56 : BaseClass(object, method), backend_ptr_(NULL) {} |
| 57 | 57 |
| 58 disk_cache::Backend* backend_ptr_; // Accessed directly. | 58 disk_cache::Backend* backend_ptr_; // Accessed directly. |
| 59 private: | 59 private: |
| 60 ~CreateBackendCallback() { | 60 virtual ~CreateBackendCallback() { |
| 61 delete backend_ptr_; | 61 delete backend_ptr_; |
| 62 } | 62 } |
| 63 }; | 63 }; |
| 64 | 64 |
| 65 enum PendingCallType { | 65 enum PendingCallType { |
| 66 CREATE, | 66 CREATE, |
| 67 OPEN, | 67 OPEN, |
| 68 DOOM | 68 DOOM |
| 69 }; | 69 }; |
| 70 struct PendingCall { | 70 struct PendingCall { |
| (...skipping 23 matching lines...) Expand all Loading... |
| 94 net::CompletionCallback* init_callback_; | 94 net::CompletionCallback* init_callback_; |
| 95 scoped_refptr<CreateBackendCallback> create_backend_callback_; | 95 scoped_refptr<CreateBackendCallback> create_backend_callback_; |
| 96 PendingCalls pending_calls_; | 96 PendingCalls pending_calls_; |
| 97 scoped_ptr<disk_cache::Backend> disk_cache_; | 97 scoped_ptr<disk_cache::Backend> disk_cache_; |
| 98 }; | 98 }; |
| 99 | 99 |
| 100 } // namespace appcache | 100 } // namespace appcache |
| 101 | 101 |
| 102 #endif // WEBKIT_APPCACHE_APPCACHE_DISK_CACHE_H_ | 102 #endif // WEBKIT_APPCACHE_APPCACHE_DISK_CACHE_H_ |
| 103 | 103 |
| OLD | NEW |