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_TEMPORARY_STORAGE_EVICTOR_H_ | 5 #ifndef WEBKIT_QUOTA_QUOTA_TEMPORARY_STORAGE_EVICTOR_H_ |
6 #define WEBKIT_QUOTA_QUOTA_TEMPORARY_STORAGE_EVICTOR_H_ | 6 #define WEBKIT_QUOTA_QUOTA_TEMPORARY_STORAGE_EVICTOR_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 28 matching lines...) Expand all Loading... |
39 num_errors_on_evicting_origin -= rhs.num_errors_on_evicting_origin; | 39 num_errors_on_evicting_origin -= rhs.num_errors_on_evicting_origin; |
40 num_errors_on_getting_usage_and_quota -= | 40 num_errors_on_getting_usage_and_quota -= |
41 rhs.num_errors_on_getting_usage_and_quota; | 41 rhs.num_errors_on_getting_usage_and_quota; |
42 num_evicted_origins -= rhs.num_evicted_origins; | 42 num_evicted_origins -= rhs.num_evicted_origins; |
43 num_eviction_rounds -= rhs.num_eviction_rounds; | 43 num_eviction_rounds -= rhs.num_eviction_rounds; |
44 num_skipped_eviction_rounds -= rhs.num_skipped_eviction_rounds; | 44 num_skipped_eviction_rounds -= rhs.num_skipped_eviction_rounds; |
45 } | 45 } |
46 }; | 46 }; |
47 | 47 |
48 struct EvictionRoundStatistics { | 48 struct EvictionRoundStatistics { |
49 EvictionRoundStatistics() | 49 EvictionRoundStatistics(); |
50 : in_round(false), | |
51 is_initialized(false), | |
52 usage_overage_at_round(-1), | |
53 diskspace_shortage_at_round(-1), | |
54 usage_on_beginning_of_round(-1), | |
55 usage_on_end_of_round(-1), | |
56 num_evicted_origins_in_round(0) { | |
57 } | |
58 | 50 |
59 bool in_round; | 51 bool in_round; |
60 bool is_initialized; | 52 bool is_initialized; |
61 | 53 |
62 base::Time start_time; | 54 base::Time start_time; |
63 int64 usage_overage_at_round; | 55 int64 usage_overage_at_round; |
64 int64 diskspace_shortage_at_round; | 56 int64 diskspace_shortage_at_round; |
65 | 57 |
66 int64 usage_on_beginning_of_round; | 58 int64 usage_on_beginning_of_round; |
67 int64 usage_on_end_of_round; | 59 int64 usage_on_end_of_round; |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 base::OneShotTimer<QuotaTemporaryStorageEvictor> eviction_timer_; | 119 base::OneShotTimer<QuotaTemporaryStorageEvictor> eviction_timer_; |
128 base::RepeatingTimer<QuotaTemporaryStorageEvictor> histogram_timer_; | 120 base::RepeatingTimer<QuotaTemporaryStorageEvictor> histogram_timer_; |
129 base::WeakPtrFactory<QuotaTemporaryStorageEvictor> weak_factory_; | 121 base::WeakPtrFactory<QuotaTemporaryStorageEvictor> weak_factory_; |
130 | 122 |
131 DISALLOW_COPY_AND_ASSIGN(QuotaTemporaryStorageEvictor); | 123 DISALLOW_COPY_AND_ASSIGN(QuotaTemporaryStorageEvictor); |
132 }; | 124 }; |
133 | 125 |
134 } // namespace quota | 126 } // namespace quota |
135 | 127 |
136 #endif // WEBKIT_QUOTA_QUOTA_TEMPORARY_STORAGE_EVICTOR_H_ | 128 #endif // WEBKIT_QUOTA_QUOTA_TEMPORARY_STORAGE_EVICTOR_H_ |
OLD | NEW |