| 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 1560 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1571 exceptions.insert(p.first); | 1571 exceptions.insert(p.first); |
| 1572 } | 1572 } |
| 1573 | 1573 |
| 1574 return exceptions; | 1574 return exceptions; |
| 1575 } | 1575 } |
| 1576 | 1576 |
| 1577 void QuotaManager::DidGetEvictionOrigin(const GetOriginCallback& callback, | 1577 void QuotaManager::DidGetEvictionOrigin(const GetOriginCallback& callback, |
| 1578 const GURL& origin) { | 1578 const GURL& origin) { |
| 1579 // Make sure the returned origin is (still) not in the origin_in_use_ set | 1579 // Make sure the returned origin is (still) not in the origin_in_use_ set |
| 1580 // and has not been accessed since we posted the task. | 1580 // and has not been accessed since we posted the task. |
| 1581 if (ContainsKey(origins_in_use_, origin) || | 1581 if (base::ContainsKey(origins_in_use_, origin) || |
| 1582 ContainsKey(access_notified_origins_, origin)) { | 1582 base::ContainsKey(access_notified_origins_, origin)) { |
| 1583 callback.Run(GURL()); | 1583 callback.Run(GURL()); |
| 1584 } else { | 1584 } else { |
| 1585 callback.Run(origin); | 1585 callback.Run(origin); |
| 1586 } | 1586 } |
| 1587 access_notified_origins_.clear(); | 1587 access_notified_origins_.clear(); |
| 1588 | 1588 |
| 1589 is_getting_eviction_origin_ = false; | 1589 is_getting_eviction_origin_ = false; |
| 1590 } | 1590 } |
| 1591 | 1591 |
| 1592 void QuotaManager::GetEvictionOrigin(StorageType type, | 1592 void QuotaManager::GetEvictionOrigin(StorageType type, |
| (...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1855 int64_t total = base::SysInfo::AmountOfTotalDiskSpace(path); | 1855 int64_t total = base::SysInfo::AmountOfTotalDiskSpace(path); |
| 1856 if (total < 0) | 1856 if (total < 0) |
| 1857 return false; | 1857 return false; |
| 1858 | 1858 |
| 1859 *available_space = static_cast<uint64_t>(available); | 1859 *available_space = static_cast<uint64_t>(available); |
| 1860 *total_size = static_cast<uint64_t>(total); | 1860 *total_size = static_cast<uint64_t>(total); |
| 1861 return true; | 1861 return true; |
| 1862 } | 1862 } |
| 1863 | 1863 |
| 1864 } // namespace storage | 1864 } // namespace storage |
| OLD | NEW |