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 |
11 #include "base/memory/weak_ptr.h" | 11 #include "base/memory/weak_ptr.h" |
12 #include "base/threading/non_thread_safe.h" | 12 #include "base/threading/non_thread_safe.h" |
13 #include "base/timer.h" | 13 #include "base/timer.h" |
14 #include "webkit/quota/quota_types.h" | 14 #include "webkit/quota/quota_types.h" |
| 15 #include "webkit/storage/webkit_storage_export.h" |
15 | 16 |
16 class GURL; | 17 class GURL; |
17 | 18 |
18 namespace quota { | 19 namespace quota { |
19 | 20 |
20 class QuotaEvictionHandler; | 21 class QuotaEvictionHandler; |
21 struct QuotaAndUsage; | 22 struct QuotaAndUsage; |
22 | 23 |
23 class QuotaTemporaryStorageEvictor : public base::NonThreadSafe { | 24 class WEBKIT_STORAGE_EXPORT_PRIVATE QuotaTemporaryStorageEvictor |
| 25 : public base::NonThreadSafe { |
24 public: | 26 public: |
25 struct Statistics { | 27 struct Statistics { |
26 Statistics() | 28 Statistics() |
27 : num_errors_on_evicting_origin(0), | 29 : num_errors_on_evicting_origin(0), |
28 num_errors_on_getting_usage_and_quota(0), | 30 num_errors_on_getting_usage_and_quota(0), |
29 num_evicted_origins(0), | 31 num_evicted_origins(0), |
30 num_eviction_rounds(0), | 32 num_eviction_rounds(0), |
31 num_skipped_eviction_rounds(0) {} | 33 num_skipped_eviction_rounds(0) {} |
32 int64 num_errors_on_evicting_origin; | 34 int64 num_errors_on_evicting_origin; |
33 int64 num_errors_on_getting_usage_and_quota; | 35 int64 num_errors_on_getting_usage_and_quota; |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 base::OneShotTimer<QuotaTemporaryStorageEvictor> eviction_timer_; | 121 base::OneShotTimer<QuotaTemporaryStorageEvictor> eviction_timer_; |
120 base::RepeatingTimer<QuotaTemporaryStorageEvictor> histogram_timer_; | 122 base::RepeatingTimer<QuotaTemporaryStorageEvictor> histogram_timer_; |
121 base::WeakPtrFactory<QuotaTemporaryStorageEvictor> weak_factory_; | 123 base::WeakPtrFactory<QuotaTemporaryStorageEvictor> weak_factory_; |
122 | 124 |
123 DISALLOW_COPY_AND_ASSIGN(QuotaTemporaryStorageEvictor); | 125 DISALLOW_COPY_AND_ASSIGN(QuotaTemporaryStorageEvictor); |
124 }; | 126 }; |
125 | 127 |
126 } // namespace quota | 128 } // namespace quota |
127 | 129 |
128 #endif // WEBKIT_QUOTA_QUOTA_TEMPORARY_STORAGE_EVICTOR_H_ | 130 #endif // WEBKIT_QUOTA_QUOTA_TEMPORARY_STORAGE_EVICTOR_H_ |
OLD | NEW |