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

Side by Side Diff: storage/browser/quota/quota_temporary_storage_evictor.h

Issue 2052663003: Move implementation of QuotaManager.getVolumeInfo to base::SysInfo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address review comments. Created 4 years, 6 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 unified diff | Download patch
OLDNEW
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
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
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698