| 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 STORAGE_BROWSER_QUOTA_QUOTA_MANAGER_H_ | 5 #ifndef STORAGE_BROWSER_QUOTA_QUOTA_MANAGER_H_ |
| 6 #define STORAGE_BROWSER_QUOTA_QUOTA_MANAGER_H_ | 6 #define STORAGE_BROWSER_QUOTA_QUOTA_MANAGER_H_ |
| 7 | 7 |
| 8 #include <deque> | 8 #include <deque> |
| 9 #include <list> | 9 #include <list> |
| 10 #include <map> | 10 #include <map> |
| (...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 445 | 445 |
| 446 int64 desired_available_space_; | 446 int64 desired_available_space_; |
| 447 | 447 |
| 448 // Map from origin to count. | 448 // Map from origin to count. |
| 449 std::map<GURL, int> origins_in_use_; | 449 std::map<GURL, int> origins_in_use_; |
| 450 // Map from origin to error count. | 450 // Map from origin to error count. |
| 451 std::map<GURL, int> origins_in_error_; | 451 std::map<GURL, int> origins_in_error_; |
| 452 | 452 |
| 453 scoped_refptr<SpecialStoragePolicy> special_storage_policy_; | 453 scoped_refptr<SpecialStoragePolicy> special_storage_policy_; |
| 454 | 454 |
| 455 base::RepeatingTimer<QuotaManager> histogram_timer_; | 455 base::RepeatingTimer histogram_timer_; |
| 456 | 456 |
| 457 // Pointer to the function used to get the available disk space. This is | 457 // Pointer to the function used to get the available disk space. This is |
| 458 // overwritten by QuotaManagerTest in order to attain a deterministic reported | 458 // overwritten by QuotaManagerTest in order to attain a deterministic reported |
| 459 // value. The default value points to base::SysInfo::AmountOfFreeDiskSpace. | 459 // value. The default value points to base::SysInfo::AmountOfFreeDiskSpace. |
| 460 GetAvailableDiskSpaceFn get_disk_space_fn_; | 460 GetAvailableDiskSpaceFn get_disk_space_fn_; |
| 461 | 461 |
| 462 scoped_ptr<StorageMonitor> storage_monitor_; | 462 scoped_ptr<StorageMonitor> storage_monitor_; |
| 463 | 463 |
| 464 base::WeakPtrFactory<QuotaManager> weak_factory_; | 464 base::WeakPtrFactory<QuotaManager> weak_factory_; |
| 465 | 465 |
| 466 DISALLOW_COPY_AND_ASSIGN(QuotaManager); | 466 DISALLOW_COPY_AND_ASSIGN(QuotaManager); |
| 467 }; | 467 }; |
| 468 | 468 |
| 469 struct QuotaManagerDeleter { | 469 struct QuotaManagerDeleter { |
| 470 static void Destruct(const QuotaManager* manager) { | 470 static void Destruct(const QuotaManager* manager) { |
| 471 manager->DeleteOnCorrectThread(); | 471 manager->DeleteOnCorrectThread(); |
| 472 } | 472 } |
| 473 }; | 473 }; |
| 474 | 474 |
| 475 } // namespace storage | 475 } // namespace storage |
| 476 | 476 |
| 477 #endif // STORAGE_BROWSER_QUOTA_QUOTA_MANAGER_H_ | 477 #endif // STORAGE_BROWSER_QUOTA_QUOTA_MANAGER_H_ |
| OLD | NEW |