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_QUOTA_QUOTA_MANAGER_H_ | 5 #ifndef WEBKIT_QUOTA_QUOTA_MANAGER_H_ |
6 #define WEBKIT_QUOTA_QUOTA_MANAGER_H_ | 6 #define WEBKIT_QUOTA_QUOTA_MANAGER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <deque> | 9 #include <deque> |
10 #include <list> | 10 #include <list> |
(...skipping 12 matching lines...) Expand all Loading... |
23 #include "webkit/quota/quota_client.h" | 23 #include "webkit/quota/quota_client.h" |
24 #include "webkit/quota/quota_task.h" | 24 #include "webkit/quota/quota_task.h" |
25 #include "webkit/quota/quota_types.h" | 25 #include "webkit/quota/quota_types.h" |
26 #include "webkit/quota/special_storage_policy.h" | 26 #include "webkit/quota/special_storage_policy.h" |
27 | 27 |
28 namespace base { | 28 namespace base { |
29 class MessageLoopProxy; | 29 class MessageLoopProxy; |
30 } | 30 } |
31 class FilePath; | 31 class FilePath; |
32 | 32 |
| 33 namespace quota_internals { |
| 34 class QuotaInternalsProxy; |
| 35 } |
| 36 |
33 namespace quota { | 37 namespace quota { |
34 | 38 |
35 struct QuotaManagerDeleter; | 39 struct QuotaManagerDeleter; |
36 | 40 |
37 class QuotaDatabase; | 41 class QuotaDatabase; |
38 class QuotaManagerProxy; | 42 class QuotaManagerProxy; |
39 class QuotaTemporaryStorageEvictor; | 43 class QuotaTemporaryStorageEvictor; |
40 class UsageTracker; | 44 class UsageTracker; |
41 | 45 |
42 // An interface called by QuotaTemporaryStorageEvictor. | 46 // An interface called by QuotaTemporaryStorageEvictor. |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
214 get_usage_and_quota_callback; | 218 get_usage_and_quota_callback; |
215 int64 usage; | 219 int64 usage; |
216 int64 unlimited_usage; | 220 int64 unlimited_usage; |
217 int64 quota; | 221 int64 quota; |
218 }; | 222 }; |
219 | 223 |
220 typedef std::pair<std::string, StorageType> HostAndType; | 224 typedef std::pair<std::string, StorageType> HostAndType; |
221 typedef std::map<HostAndType, UsageAndQuotaDispatcherTask*> | 225 typedef std::map<HostAndType, UsageAndQuotaDispatcherTask*> |
222 UsageAndQuotaDispatcherTaskMap; | 226 UsageAndQuotaDispatcherTaskMap; |
223 | 227 |
| 228 friend class quota_internals::QuotaInternalsProxy; |
224 friend struct QuotaManagerDeleter; | 229 friend struct QuotaManagerDeleter; |
225 friend class MockStorageClient; | 230 friend class MockStorageClient; |
226 friend class QuotaManagerProxy; | 231 friend class QuotaManagerProxy; |
227 friend class QuotaManagerTest; | 232 friend class QuotaManagerTest; |
228 friend class QuotaTemporaryStorageEvictor; | 233 friend class QuotaTemporaryStorageEvictor; |
229 | 234 |
230 // This initialization method is lazily called on the IO thread | 235 // This initialization method is lazily called on the IO thread |
231 // when the first quota manager API is called. | 236 // when the first quota manager API is called. |
232 // Initialize must be called after all quota clients are added to the | 237 // Initialize must be called after all quota clients are added to the |
233 // manager by RegisterStorage. | 238 // manager by RegisterStorage. |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
368 | 373 |
369 QuotaManager* manager_; // only accessed on the io thread | 374 QuotaManager* manager_; // only accessed on the io thread |
370 scoped_refptr<base::MessageLoopProxy> io_thread_; | 375 scoped_refptr<base::MessageLoopProxy> io_thread_; |
371 | 376 |
372 DISALLOW_COPY_AND_ASSIGN(QuotaManagerProxy); | 377 DISALLOW_COPY_AND_ASSIGN(QuotaManagerProxy); |
373 }; | 378 }; |
374 | 379 |
375 } // namespace quota | 380 } // namespace quota |
376 | 381 |
377 #endif // WEBKIT_QUOTA_QUOTA_MANAGER_H_ | 382 #endif // WEBKIT_QUOTA_QUOTA_MANAGER_H_ |
OLD | NEW |