OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 STORAGE_BROWSER_QUOTA_QUOTA_TEMPORARY_STORAGE_EVICTOR_H_ | 5 #ifndef STORAGE_BROWSER_QUOTA_QUOTA_TEMPORARY_STORAGE_EVICTOR_H_ |
6 #define STORAGE_BROWSER_QUOTA_QUOTA_TEMPORARY_STORAGE_EVICTOR_H_ | 6 #define STORAGE_BROWSER_QUOTA_QUOTA_TEMPORARY_STORAGE_EVICTOR_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 void set_min_available_disk_space_to_start_eviction(int64_t value) { | 85 void set_min_available_disk_space_to_start_eviction(int64_t value) { |
86 min_available_to_start_eviction_ = value; | 86 min_available_to_start_eviction_ = value; |
87 } | 87 } |
88 | 88 |
89 private: | 89 private: |
90 friend class content::QuotaTemporaryStorageEvictorTest; | 90 friend class content::QuotaTemporaryStorageEvictorTest; |
91 | 91 |
92 void StartEvictionTimerWithDelay(int delay_ms); | 92 void StartEvictionTimerWithDelay(int delay_ms); |
93 void ConsiderEviction(); | 93 void ConsiderEviction(); |
94 void OnGotVolumeInfo(bool success, | 94 void OnGotVolumeInfo(bool success, |
95 uint64_t available_space, | 95 int64_t available_space, |
96 uint64_t total_size); | 96 int64_t total_size); |
97 void OnGotUsageAndQuotaForEviction( | 97 void OnGotUsageAndQuotaForEviction( |
98 int64_t must_remain_available_space, | 98 int64_t must_remain_available_space, |
99 QuotaStatusCode status, | 99 QuotaStatusCode status, |
100 const UsageAndQuota& quota_and_usage); | 100 const UsageAndQuota& quota_and_usage); |
101 void OnGotEvictionOrigin(const GURL& origin); | 101 void OnGotEvictionOrigin(const GURL& origin); |
102 void OnEvictionComplete(QuotaStatusCode status); | 102 void OnEvictionComplete(QuotaStatusCode status); |
103 | 103 |
104 void OnEvictionRoundStarted(); | 104 void OnEvictionRoundStarted(); |
105 void OnEvictionRoundFinished(); | 105 void OnEvictionRoundFinished(); |
106 | 106 |
(...skipping 22 matching lines...) Expand all Loading... |
129 base::OneShotTimer eviction_timer_; | 129 base::OneShotTimer eviction_timer_; |
130 base::RepeatingTimer histogram_timer_; | 130 base::RepeatingTimer histogram_timer_; |
131 base::WeakPtrFactory<QuotaTemporaryStorageEvictor> weak_factory_; | 131 base::WeakPtrFactory<QuotaTemporaryStorageEvictor> weak_factory_; |
132 | 132 |
133 DISALLOW_COPY_AND_ASSIGN(QuotaTemporaryStorageEvictor); | 133 DISALLOW_COPY_AND_ASSIGN(QuotaTemporaryStorageEvictor); |
134 }; | 134 }; |
135 | 135 |
136 } // namespace storage | 136 } // namespace storage |
137 | 137 |
138 #endif // STORAGE_BROWSER_QUOTA_QUOTA_TEMPORARY_STORAGE_EVICTOR_H_ | 138 #endif // STORAGE_BROWSER_QUOTA_QUOTA_TEMPORARY_STORAGE_EVICTOR_H_ |
OLD | NEW |