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 WEBKIT_BROWSER_QUOTA_QUOTA_TEMPORARY_STORAGE_EVICTOR_H_ | 5 #ifndef WEBKIT_BROWSER_QUOTA_QUOTA_TEMPORARY_STORAGE_EVICTOR_H_ |
6 #define WEBKIT_BROWSER_QUOTA_QUOTA_TEMPORARY_STORAGE_EVICTOR_H_ | 6 #define WEBKIT_BROWSER_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/timer.h" | 13 #include "base/timer/timer.h" |
14 #include "webkit/browser/webkit_storage_browser_export.h" | 14 #include "webkit/browser/webkit_storage_browser_export.h" |
15 #include "webkit/common/quota/quota_types.h" | 15 #include "webkit/common/quota/quota_types.h" |
16 | 16 |
17 class GURL; | 17 class GURL; |
18 | 18 |
19 namespace content { | 19 namespace content { |
20 class QuotaTemporaryStorageEvictorTest; | 20 class QuotaTemporaryStorageEvictorTest; |
21 } | 21 } |
22 | 22 |
23 namespace quota { | 23 namespace storage { |
24 | 24 |
25 class QuotaEvictionHandler; | 25 class QuotaEvictionHandler; |
26 struct UsageAndQuota; | 26 struct UsageAndQuota; |
27 | 27 |
28 class WEBKIT_STORAGE_BROWSER_EXPORT_PRIVATE QuotaTemporaryStorageEvictor | 28 class WEBKIT_STORAGE_BROWSER_EXPORT_PRIVATE QuotaTemporaryStorageEvictor |
29 : public base::NonThreadSafe { | 29 : public base::NonThreadSafe { |
30 public: | 30 public: |
31 struct Statistics { | 31 struct Statistics { |
32 Statistics() | 32 Statistics() |
33 : num_errors_on_evicting_origin(0), | 33 : num_errors_on_evicting_origin(0), |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 int64 interval_ms_; | 122 int64 interval_ms_; |
123 bool repeated_eviction_; | 123 bool repeated_eviction_; |
124 | 124 |
125 base::OneShotTimer<QuotaTemporaryStorageEvictor> eviction_timer_; | 125 base::OneShotTimer<QuotaTemporaryStorageEvictor> eviction_timer_; |
126 base::RepeatingTimer<QuotaTemporaryStorageEvictor> histogram_timer_; | 126 base::RepeatingTimer<QuotaTemporaryStorageEvictor> histogram_timer_; |
127 base::WeakPtrFactory<QuotaTemporaryStorageEvictor> weak_factory_; | 127 base::WeakPtrFactory<QuotaTemporaryStorageEvictor> weak_factory_; |
128 | 128 |
129 DISALLOW_COPY_AND_ASSIGN(QuotaTemporaryStorageEvictor); | 129 DISALLOW_COPY_AND_ASSIGN(QuotaTemporaryStorageEvictor); |
130 }; | 130 }; |
131 | 131 |
132 } // namespace quota | 132 } // namespace storage |
133 | 133 |
134 #endif // WEBKIT_BROWSER_QUOTA_QUOTA_TEMPORARY_STORAGE_EVICTOR_H_ | 134 #endif // WEBKIT_BROWSER_QUOTA_QUOTA_TEMPORARY_STORAGE_EVICTOR_H_ |
OLD | NEW |