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 <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <functional> | 10 #include <functional> |
(...skipping 1761 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1772 } | 1772 } |
1773 | 1773 |
1774 void AppCacheStorageImpl::DeleteResponses( | 1774 void AppCacheStorageImpl::DeleteResponses( |
1775 const GURL& manifest_url, | 1775 const GURL& manifest_url, |
1776 const std::vector<int64_t>& response_ids) { | 1776 const std::vector<int64_t>& response_ids) { |
1777 if (response_ids.empty()) | 1777 if (response_ids.empty()) |
1778 return; | 1778 return; |
1779 StartDeletingResponses(response_ids); | 1779 StartDeletingResponses(response_ids); |
1780 } | 1780 } |
1781 | 1781 |
| 1782 bool AppCacheStorageImpl::IsInitialized() { |
| 1783 return IsInitTaskComplete(); |
| 1784 } |
| 1785 |
1782 void AppCacheStorageImpl::DelayedStartDeletingUnusedResponses() { | 1786 void AppCacheStorageImpl::DelayedStartDeletingUnusedResponses() { |
1783 // Only if we haven't already begun. | 1787 // Only if we haven't already begun. |
1784 if (!did_start_deleting_responses_) { | 1788 if (!did_start_deleting_responses_) { |
1785 scoped_refptr<GetDeletableResponseIdsTask> task( | 1789 scoped_refptr<GetDeletableResponseIdsTask> task( |
1786 new GetDeletableResponseIdsTask(this, last_deletable_response_rowid_)); | 1790 new GetDeletableResponseIdsTask(this, last_deletable_response_rowid_)); |
1787 task->Schedule(); | 1791 task->Schedule(); |
1788 } | 1792 } |
1789 } | 1793 } |
1790 | 1794 |
1791 void AppCacheStorageImpl::StartDeletingResponses( | 1795 void AppCacheStorageImpl::StartDeletingResponses( |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1981 | 1985 |
1982 void AppCacheStorageImpl::OnLazyCommitTimer() { | 1986 void AppCacheStorageImpl::OnLazyCommitTimer() { |
1983 lazy_commit_timer_.Stop(); | 1987 lazy_commit_timer_.Stop(); |
1984 if (is_disabled()) | 1988 if (is_disabled()) |
1985 return; | 1989 return; |
1986 scoped_refptr<DatabaseTask> task(new CommitLastAccessTimesTask(this)); | 1990 scoped_refptr<DatabaseTask> task(new CommitLastAccessTimesTask(this)); |
1987 task->Schedule(); | 1991 task->Schedule(); |
1988 } | 1992 } |
1989 | 1993 |
1990 } // namespace content | 1994 } // namespace content |
OLD | NEW |