Chromium Code Reviews| Index: webkit/quota/quota_manager.h |
| diff --git a/webkit/quota/quota_manager.h b/webkit/quota/quota_manager.h |
| index 6390b7347041da252a18aa08f32004ab4a6bed31..f288cc90a1d3a700f036cce9d92af05c25f881f7 100644 |
| --- a/webkit/quota/quota_manager.h |
| +++ b/webkit/quota/quota_manager.h |
| @@ -39,13 +39,13 @@ class QuotaInternalsProxy; |
| namespace quota { |
| -struct QuotaManagerDeleter; |
| - |
| +class MockQuotaManager; |
| class QuotaDatabase; |
| class QuotaManagerProxy; |
| class QuotaTemporaryStorageEvictor; |
| class UsageTracker; |
| -class MockQuotaManager; |
| + |
| +struct QuotaManagerDeleter; |
| struct QuotaAndUsage { |
| int64 usage; |
| @@ -188,6 +188,11 @@ class QuotaManager : public QuotaTaskObserver, |
| special_storage_policy_->IsStorageUnlimited(origin); |
| } |
| + bool IsInstalledApp(const GURL& origin) const { |
| + return special_storage_policy_.get() && |
| + special_storage_policy_->IsInstalledApp(origin); |
| + } |
| + |
| virtual void GetOriginsModifiedSince(StorageType type, |
| base::Time modified_since, |
| const GetOriginsCallback& callback); |
| @@ -247,6 +252,10 @@ class QuotaManager : public QuotaTaskObserver, |
| typedef std::vector<QuotaTableEntry> QuotaTableEntries; |
| typedef std::vector<OriginInfoTableEntry> OriginInfoTableEntries; |
| + // Function pointer type used to store the function which returns the |
| + // available disk space for the disk containing the given FilePath. |
| + typedef int64 (*GetAvailableDiskSpaceFn)(const FilePath&); |
| + |
| typedef base::Callback<void(const QuotaTableEntries&)> |
| DumpQuotaTableCallback; |
| typedef base::Callback<void(const OriginInfoTableEntries&)> |
| @@ -387,6 +396,11 @@ class QuotaManager : public QuotaTaskObserver, |
| base::WeakPtrFactory<QuotaManager> weak_factory_; |
| base::RepeatingTimer<QuotaManager> histogram_timer_; |
| + // Pointer to the function used to get the available disk space. This is |
| + // overwritten by QuotaManagerTest in order to attain a deterministic reported |
| + // value. |
|
kinuko
2012/08/20 04:04:44
nit: can you also add a comment about what is call
James Hawkins
2012/08/22 18:51:36
Done.
|
| + GetAvailableDiskSpaceFn get_disk_space_fn_; |
| + |
| DISALLOW_COPY_AND_ASSIGN(QuotaManager); |
| }; |