| 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 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <functional> | 10 #include <functional> |
| (...skipping 1650 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1661 if (db_disabled_) { | 1661 if (db_disabled_) { |
| 1662 lru_origin_callback_.Run(GURL()); | 1662 lru_origin_callback_.Run(GURL()); |
| 1663 lru_origin_callback_.Reset(); | 1663 lru_origin_callback_.Reset(); |
| 1664 return; | 1664 return; |
| 1665 } | 1665 } |
| 1666 | 1666 |
| 1667 GURL* url = new GURL; | 1667 GURL* url = new GURL; |
| 1668 PostTaskAndReplyWithResultForDBThread( | 1668 PostTaskAndReplyWithResultForDBThread( |
| 1669 FROM_HERE, base::Bind(&GetLRUOriginOnDBThread, type, | 1669 FROM_HERE, base::Bind(&GetLRUOriginOnDBThread, type, |
| 1670 GetEvictionOriginExceptions(std::set<GURL>()), | 1670 GetEvictionOriginExceptions(std::set<GURL>()), |
| 1671 special_storage_policy_, base::Unretained(url)), | 1671 base::RetainedRef(special_storage_policy_), |
| 1672 base::Unretained(url)), |
| 1672 base::Bind(&QuotaManager::DidGetLRUOrigin, weak_factory_.GetWeakPtr(), | 1673 base::Bind(&QuotaManager::DidGetLRUOrigin, weak_factory_.GetWeakPtr(), |
| 1673 base::Owned(url))); | 1674 base::Owned(url))); |
| 1674 } | 1675 } |
| 1675 | 1676 |
| 1676 void QuotaManager::DidSetTemporaryGlobalOverrideQuota( | 1677 void QuotaManager::DidSetTemporaryGlobalOverrideQuota( |
| 1677 const QuotaCallback& callback, | 1678 const QuotaCallback& callback, |
| 1678 const int64_t* new_quota, | 1679 const int64_t* new_quota, |
| 1679 bool success) { | 1680 bool success) { |
| 1680 QuotaStatusCode status = kQuotaErrorInvalidAccess; | 1681 QuotaStatusCode status = kQuotaErrorInvalidAccess; |
| 1681 DidDatabaseWork(success); | 1682 DidDatabaseWork(success); |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1832 return false; | 1833 return false; |
| 1833 *available_space = static_cast<uint64_t>(stats.f_bavail) * stats.f_frsize; | 1834 *available_space = static_cast<uint64_t>(stats.f_bavail) * stats.f_frsize; |
| 1834 *total_size = static_cast<uint64_t>(stats.f_blocks) * stats.f_frsize; | 1835 *total_size = static_cast<uint64_t>(stats.f_blocks) * stats.f_frsize; |
| 1835 #else | 1836 #else |
| 1836 #error Not implemented | 1837 #error Not implemented |
| 1837 #endif | 1838 #endif |
| 1838 return true; | 1839 return true; |
| 1839 } | 1840 } |
| 1840 | 1841 |
| 1841 } // namespace storage | 1842 } // namespace storage |
| OLD | NEW |