Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1096)

Unified Diff: storage/browser/quota/quota_temporary_storage_evictor.h

Issue 1782053004: Change how the quota system computes the total poolsize for temporary storage (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: storage/browser/quota/quota_temporary_storage_evictor.h
diff --git a/storage/browser/quota/quota_temporary_storage_evictor.h b/storage/browser/quota/quota_temporary_storage_evictor.h
index 8039426bca6df6ed895e48a36fc9a6484169ebf5..201bf4a89e8872d53fdb47a68f3ce0ab83768c8c 100644
--- a/storage/browser/quota/quota_temporary_storage_evictor.h
+++ b/storage/browser/quota/quota_temporary_storage_evictor.h
@@ -27,7 +27,7 @@ class QuotaTemporaryStorageEvictorTest;
namespace storage {
class QuotaEvictionHandler;
-struct UsageAndQuota;
+struct TemporaryStorageConfiguration;
class STORAGE_EXPORT QuotaTemporaryStorageEvictor : public base::NonThreadSafe {
public:
@@ -78,41 +78,21 @@ class STORAGE_EXPORT QuotaTemporaryStorageEvictor : public base::NonThreadSafe {
void ReportPerHourHistogram();
void Start();
- void reset_min_available_disk_space_to_start_eviction() {
- min_available_to_start_eviction_ =
- kMinAvailableToStartEvictionNotSpecified;
- }
- void set_min_available_disk_space_to_start_eviction(int64_t value) {
- min_available_to_start_eviction_ = value;
- }
-
private:
friend class content::QuotaTemporaryStorageEvictorTest;
void StartEvictionTimerWithDelay(int delay_ms);
void ConsiderEviction();
- void OnGotVolumeInfo(bool success,
- uint64_t available_space,
- uint64_t total_size);
- void OnGotUsageAndQuotaForEviction(
- int64_t must_remain_available_space,
- QuotaStatusCode status,
- const UsageAndQuota& quota_and_usage);
+ void OnGotEvictionRoundInfo(
+ QuotaStatusCode status, const TemporaryStorageConfiguration& config,
+ int64_t available_space, int64_t total_space,
+ int64_t current_usage, bool current_usage_is_complete);
void OnGotEvictionOrigin(const GURL& origin);
void OnEvictionComplete(QuotaStatusCode status);
void OnEvictionRoundStarted();
void OnEvictionRoundFinished();
- // This is only used for tests.
- void set_repeated_eviction(bool repeated_eviction) {
- repeated_eviction_ = repeated_eviction;
- }
-
- static const int kMinAvailableToStartEvictionNotSpecified;
-
- int64_t min_available_to_start_eviction_;
-
// Not owned; quota_eviction_handler owns us.
QuotaEvictionHandler* quota_eviction_handler_;
@@ -124,7 +104,7 @@ class STORAGE_EXPORT QuotaTemporaryStorageEvictor : public base::NonThreadSafe {
std::set<GURL> in_progress_eviction_origins_;
int64_t interval_ms_;
- bool repeated_eviction_;
+ bool timer_disabled_for_testing_;
base::OneShotTimer eviction_timer_;
base::RepeatingTimer histogram_timer_;

Powered by Google App Engine
This is Rietveld 408576698