| 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 "storage/browser/quota/quota_temporary_storage_evictor.h" | 5 #include "storage/browser/quota/quota_temporary_storage_evictor.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 | 10 |
| 11 #include "base/bind.h" | 11 #include "base/bind.h" |
| 12 #include "base/metrics/histogram.h" | 12 #include "base/metrics/histogram_macros.h" |
| 13 #include "storage/browser/quota/quota_manager.h" | 13 #include "storage/browser/quota/quota_manager.h" |
| 14 #include "url/gurl.h" | 14 #include "url/gurl.h" |
| 15 | 15 |
| 16 #define UMA_HISTOGRAM_MBYTES(name, sample) \ | 16 #define UMA_HISTOGRAM_MBYTES(name, sample) \ |
| 17 UMA_HISTOGRAM_CUSTOM_COUNTS( \ | 17 UMA_HISTOGRAM_CUSTOM_COUNTS( \ |
| 18 (name), static_cast<int>((sample) / kMBytes), \ | 18 (name), static_cast<int>((sample) / kMBytes), \ |
| 19 1, 10 * 1024 * 1024 /* 10TB */, 100) | 19 1, 10 * 1024 * 1024 /* 10TB */, 100) |
| 20 | 20 |
| 21 #define UMA_HISTOGRAM_MINUTES(name, sample) \ | 21 #define UMA_HISTOGRAM_MINUTES(name, sample) \ |
| 22 UMA_HISTOGRAM_CUSTOM_TIMES( \ | 22 UMA_HISTOGRAM_CUSTOM_TIMES( \ |
| (...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 286 ++statistics_.num_errors_on_evicting_origin; | 286 ++statistics_.num_errors_on_evicting_origin; |
| 287 if (repeated_eviction_) { | 287 if (repeated_eviction_) { |
| 288 // Sleep for a while and retry again until we see too many errors. | 288 // Sleep for a while and retry again until we see too many errors. |
| 289 StartEvictionTimerWithDelay(interval_ms_); | 289 StartEvictionTimerWithDelay(interval_ms_); |
| 290 } | 290 } |
| 291 OnEvictionRoundFinished(); | 291 OnEvictionRoundFinished(); |
| 292 } | 292 } |
| 293 } | 293 } |
| 294 | 294 |
| 295 } // namespace storage | 295 } // namespace storage |
| OLD | NEW |