OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_QUOTA_CLIENT_H_ | 5 #ifndef CONTENT_BROWSER_APPCACHE_APPCACHE_QUOTA_CLIENT_H_ |
6 #define CONTENT_BROWSER_APPCACHE_APPCACHE_QUOTA_CLIENT_H_ | 6 #define CONTENT_BROWSER_APPCACHE_APPCACHE_QUOTA_CLIENT_H_ |
7 | 7 |
8 #include <deque> | 8 #include <deque> |
9 #include <map> | 9 #include <map> |
| 10 #include <memory> |
10 #include <string> | 11 #include <string> |
11 | 12 |
12 #include "base/macros.h" | 13 #include "base/macros.h" |
13 #include "base/memory/ref_counted.h" | 14 #include "base/memory/ref_counted.h" |
14 #include "base/memory/scoped_ptr.h" | |
15 #include "content/browser/appcache/appcache_storage.h" | 15 #include "content/browser/appcache/appcache_storage.h" |
16 #include "content/common/content_export.h" | 16 #include "content/common/content_export.h" |
17 #include "net/base/completion_callback.h" | 17 #include "net/base/completion_callback.h" |
18 #include "storage/browser/quota/quota_client.h" | 18 #include "storage/browser/quota/quota_client.h" |
19 #include "storage/browser/quota/quota_task.h" | 19 #include "storage/browser/quota/quota_task.h" |
20 #include "storage/common/quota/quota_types.h" | 20 #include "storage/common/quota/quota_types.h" |
21 | 21 |
22 namespace content { | 22 namespace content { |
23 class AppCacheQuotaClientTest; | 23 class AppCacheQuotaClientTest; |
24 class AppCacheServiceImpl; | 24 class AppCacheServiceImpl; |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 CONTENT_EXPORT void NotifyAppCacheDestroyed(); | 73 CONTENT_EXPORT void NotifyAppCacheDestroyed(); |
74 | 74 |
75 // Prior to appcache service being ready, we have to queue | 75 // Prior to appcache service being ready, we have to queue |
76 // up reqeusts and defer acting on them until we're ready. | 76 // up reqeusts and defer acting on them until we're ready. |
77 RequestQueue pending_batch_requests_; | 77 RequestQueue pending_batch_requests_; |
78 RequestQueue pending_serial_requests_; | 78 RequestQueue pending_serial_requests_; |
79 | 79 |
80 // And once it's ready, we can only handle one delete request at a time, | 80 // And once it's ready, we can only handle one delete request at a time, |
81 // so we queue up additional requests while one is in already in progress. | 81 // so we queue up additional requests while one is in already in progress. |
82 DeletionCallback current_delete_request_callback_; | 82 DeletionCallback current_delete_request_callback_; |
83 scoped_ptr<net::CancelableCompletionCallback> service_delete_callback_; | 83 std::unique_ptr<net::CancelableCompletionCallback> service_delete_callback_; |
84 | 84 |
85 AppCacheServiceImpl* service_; | 85 AppCacheServiceImpl* service_; |
86 bool appcache_is_ready_; | 86 bool appcache_is_ready_; |
87 bool quota_manager_is_destroyed_; | 87 bool quota_manager_is_destroyed_; |
88 | 88 |
89 DISALLOW_COPY_AND_ASSIGN(AppCacheQuotaClient); | 89 DISALLOW_COPY_AND_ASSIGN(AppCacheQuotaClient); |
90 }; | 90 }; |
91 | 91 |
92 } // namespace content | 92 } // namespace content |
93 | 93 |
94 #endif // CONTENT_BROWSER_APPCACHE_APPCACHE_QUOTA_CLIENT_H_ | 94 #endif // CONTENT_BROWSER_APPCACHE_APPCACHE_QUOTA_CLIENT_H_ |
OLD | NEW |