| 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_manager.h" | 5 #include "storage/browser/quota/quota_manager.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 1091 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1102 StorageObserver* observer, const StorageObserver::MonitorParams& params) { | 1102 StorageObserver* observer, const StorageObserver::MonitorParams& params) { |
| 1103 DCHECK(observer); | 1103 DCHECK(observer); |
| 1104 storage_monitor_->AddObserver(observer, params); | 1104 storage_monitor_->AddObserver(observer, params); |
| 1105 } | 1105 } |
| 1106 | 1106 |
| 1107 void QuotaManager::RemoveStorageObserver(StorageObserver* observer) { | 1107 void QuotaManager::RemoveStorageObserver(StorageObserver* observer) { |
| 1108 DCHECK(observer); | 1108 DCHECK(observer); |
| 1109 storage_monitor_->RemoveObserver(observer); | 1109 storage_monitor_->RemoveObserver(observer); |
| 1110 } | 1110 } |
| 1111 | 1111 |
| 1112 void QuotaManager::RemoveStorageObserverForFilter( | |
| 1113 StorageObserver* observer, const StorageObserver::Filter& filter) { | |
| 1114 DCHECK(observer); | |
| 1115 storage_monitor_->RemoveObserverForFilter(observer, filter); | |
| 1116 } | |
| 1117 | |
| 1118 QuotaManager::~QuotaManager() { | 1112 QuotaManager::~QuotaManager() { |
| 1119 proxy_->manager_ = NULL; | 1113 proxy_->manager_ = NULL; |
| 1120 for (auto* client : clients_) | 1114 for (auto* client : clients_) |
| 1121 client->OnQuotaManagerDestroyed(); | 1115 client->OnQuotaManagerDestroyed(); |
| 1122 if (database_) | 1116 if (database_) |
| 1123 db_thread_->DeleteSoon(FROM_HERE, database_.release()); | 1117 db_thread_->DeleteSoon(FROM_HERE, database_.release()); |
| 1124 } | 1118 } |
| 1125 | 1119 |
| 1126 QuotaManager::EvictionContext::EvictionContext() | 1120 QuotaManager::EvictionContext::EvictionContext() |
| 1127 : evicted_type(kStorageTypeUnknown) { | 1121 : evicted_type(kStorageTypeUnknown) { |
| (...skipping 557 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1685 } | 1679 } |
| 1686 | 1680 |
| 1687 // static | 1681 // static |
| 1688 std::tuple<int64_t, int64_t> QuotaManager::GetVolumeInfo( | 1682 std::tuple<int64_t, int64_t> QuotaManager::GetVolumeInfo( |
| 1689 const base::FilePath& path) { | 1683 const base::FilePath& path) { |
| 1690 return std::make_tuple(base::SysInfo::AmountOfTotalDiskSpace(path), | 1684 return std::make_tuple(base::SysInfo::AmountOfTotalDiskSpace(path), |
| 1691 base::SysInfo::AmountOfFreeDiskSpace(path)); | 1685 base::SysInfo::AmountOfFreeDiskSpace(path)); |
| 1692 } | 1686 } |
| 1693 | 1687 |
| 1694 } // namespace storage | 1688 } // namespace storage |
| OLD | NEW |