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 #include "webkit/browser/quota/quota_temporary_storage_evictor.h" | 5 #include "storage/browser/quota/quota_temporary_storage_evictor.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
| 11 #include "storage/browser/quota/quota_manager.h" |
11 #include "url/gurl.h" | 12 #include "url/gurl.h" |
12 #include "webkit/browser/quota/quota_manager.h" | |
13 | 13 |
14 #define UMA_HISTOGRAM_MBYTES(name, sample) \ | 14 #define UMA_HISTOGRAM_MBYTES(name, sample) \ |
15 UMA_HISTOGRAM_CUSTOM_COUNTS( \ | 15 UMA_HISTOGRAM_CUSTOM_COUNTS( \ |
16 (name), static_cast<int>((sample) / kMBytes), \ | 16 (name), static_cast<int>((sample) / kMBytes), \ |
17 1, 10 * 1024 * 1024 /* 10TB */, 100) | 17 1, 10 * 1024 * 1024 /* 10TB */, 100) |
18 | 18 |
19 #define UMA_HISTOGRAM_MINUTES(name, sample) \ | 19 #define UMA_HISTOGRAM_MINUTES(name, sample) \ |
20 UMA_HISTOGRAM_CUSTOM_TIMES( \ | 20 UMA_HISTOGRAM_CUSTOM_TIMES( \ |
21 (name), (sample), \ | 21 (name), (sample), \ |
22 base::TimeDelta::FromMinutes(1), \ | 22 base::TimeDelta::FromMinutes(1), \ |
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
252 ++statistics_.num_errors_on_evicting_origin; | 252 ++statistics_.num_errors_on_evicting_origin; |
253 if (repeated_eviction_) { | 253 if (repeated_eviction_) { |
254 // Sleep for a while and retry again until we see too many errors. | 254 // Sleep for a while and retry again until we see too many errors. |
255 StartEvictionTimerWithDelay(interval_ms_); | 255 StartEvictionTimerWithDelay(interval_ms_); |
256 } | 256 } |
257 OnEvictionRoundFinished(); | 257 OnEvictionRoundFinished(); |
258 } | 258 } |
259 } | 259 } |
260 | 260 |
261 } // namespace storage | 261 } // namespace storage |
OLD | NEW |