| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/browser/appcache/appcache_storage_impl.h" | 5 #include "content/browser/appcache/appcache_storage_impl.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <functional> | 8 #include <functional> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 1625 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1636 AppCacheResponseReader* AppCacheStorageImpl::CreateResponseReader( | 1636 AppCacheResponseReader* AppCacheStorageImpl::CreateResponseReader( |
| 1637 const GURL& manifest_url, int64 group_id, int64 response_id) { | 1637 const GURL& manifest_url, int64 group_id, int64 response_id) { |
| 1638 return new AppCacheResponseReader(response_id, group_id, disk_cache()); | 1638 return new AppCacheResponseReader(response_id, group_id, disk_cache()); |
| 1639 } | 1639 } |
| 1640 | 1640 |
| 1641 AppCacheResponseWriter* AppCacheStorageImpl::CreateResponseWriter( | 1641 AppCacheResponseWriter* AppCacheStorageImpl::CreateResponseWriter( |
| 1642 const GURL& manifest_url, int64 group_id) { | 1642 const GURL& manifest_url, int64 group_id) { |
| 1643 return new AppCacheResponseWriter(NewResponseId(), group_id, disk_cache()); | 1643 return new AppCacheResponseWriter(NewResponseId(), group_id, disk_cache()); |
| 1644 } | 1644 } |
| 1645 | 1645 |
| 1646 AppCacheResponseMetadataWriter* |
| 1647 AppCacheStorageImpl::CreateResponseMetadataWriter(int64 group_id, |
| 1648 int64 response_id) { |
| 1649 return new AppCacheResponseMetadataWriter(response_id, group_id, |
| 1650 disk_cache()); |
| 1651 } |
| 1652 |
| 1646 void AppCacheStorageImpl::DoomResponses( | 1653 void AppCacheStorageImpl::DoomResponses( |
| 1647 const GURL& manifest_url, const std::vector<int64>& response_ids) { | 1654 const GURL& manifest_url, const std::vector<int64>& response_ids) { |
| 1648 if (response_ids.empty()) | 1655 if (response_ids.empty()) |
| 1649 return; | 1656 return; |
| 1650 | 1657 |
| 1651 // Start deleting them from the disk cache lazily. | 1658 // Start deleting them from the disk cache lazily. |
| 1652 StartDeletingResponses(response_ids); | 1659 StartDeletingResponses(response_ids); |
| 1653 | 1660 |
| 1654 // Also schedule a database task to record these ids in the | 1661 // Also schedule a database task to record these ids in the |
| 1655 // deletable responses table. | 1662 // deletable responses table. |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1857 base::Bind(&AppCacheStorageImpl::CallScheduleReinitialize, | 1864 base::Bind(&AppCacheStorageImpl::CallScheduleReinitialize, |
| 1858 weak_factory_.GetWeakPtr())); | 1865 weak_factory_.GetWeakPtr())); |
| 1859 } | 1866 } |
| 1860 | 1867 |
| 1861 void AppCacheStorageImpl::CallScheduleReinitialize() { | 1868 void AppCacheStorageImpl::CallScheduleReinitialize() { |
| 1862 service_->ScheduleReinitialize(); | 1869 service_->ScheduleReinitialize(); |
| 1863 // note: 'this' may be deleted at this point. | 1870 // note: 'this' may be deleted at this point. |
| 1864 } | 1871 } |
| 1865 | 1872 |
| 1866 } // namespace content | 1873 } // namespace content |
| OLD | NEW |