| 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 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 215 get_usage_and_quota_callback; | 219 get_usage_and_quota_callback; |
| 216 int64 usage; | 220 int64 usage; |
| 217 int64 unlimited_usage; | 221 int64 unlimited_usage; |
| 218 int64 quota; | 222 int64 quota; |
| 219 }; | 223 }; |
| 220 | 224 |
| 221 typedef std::pair<std::string, StorageType> HostAndType; | 225 typedef std::pair<std::string, StorageType> HostAndType; |
| 222 typedef std::map<HostAndType, UsageAndQuotaDispatcherTask*> | 226 typedef std::map<HostAndType, UsageAndQuotaDispatcherTask*> |
| 223 UsageAndQuotaDispatcherTaskMap; | 227 UsageAndQuotaDispatcherTaskMap; |
| 224 | 228 |
| 229 friend class quota_internals::QuotaInternalsProxy; |
| 225 friend struct QuotaManagerDeleter; | 230 friend struct QuotaManagerDeleter; |
| 226 friend class MockStorageClient; | 231 friend class MockStorageClient; |
| 227 friend class QuotaManagerProxy; | 232 friend class QuotaManagerProxy; |
| 228 friend class QuotaManagerTest; | 233 friend class QuotaManagerTest; |
| 229 friend class QuotaTemporaryStorageEvictor; | 234 friend class QuotaTemporaryStorageEvictor; |
| 230 | 235 |
| 231 // This initialization method is lazily called on the IO thread | 236 // This initialization method is lazily called on the IO thread |
| 232 // when the first quota manager API is called. | 237 // when the first quota manager API is called. |
| 233 // Initialize must be called after all quota clients are added to the | 238 // Initialize must be called after all quota clients are added to the |
| 234 // manager by RegisterStorage. | 239 // manager by RegisterStorage. |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 369 | 374 |
| 370 QuotaManager* manager_; // only accessed on the io thread | 375 QuotaManager* manager_; // only accessed on the io thread |
| 371 scoped_refptr<base::MessageLoopProxy> io_thread_; | 376 scoped_refptr<base::MessageLoopProxy> io_thread_; |
| 372 | 377 |
| 373 DISALLOW_COPY_AND_ASSIGN(QuotaManagerProxy); | 378 DISALLOW_COPY_AND_ASSIGN(QuotaManagerProxy); |
| 374 }; | 379 }; |
| 375 | 380 |
| 376 } // namespace quota | 381 } // namespace quota |
| 377 | 382 |
| 378 #endif // WEBKIT_QUOTA_QUOTA_MANAGER_H_ | 383 #endif // WEBKIT_QUOTA_QUOTA_MANAGER_H_ |
| OLD | NEW |