| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "webkit/appcache/appcache_storage_impl.h" | 5 #include "webkit/appcache/appcache_storage_impl.h" |
| 6 | 6 |
| 7 #include "app/sql/connection.h" | 7 #include "app/sql/connection.h" |
| 8 #include "app/sql/transaction.h" | 8 #include "app/sql/transaction.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
| 11 #include "base/stl_util-inl.h" | 11 #include "base/stl_util-inl.h" |
| (...skipping 746 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 758 } | 758 } |
| 759 | 759 |
| 760 void AppCacheStorageImpl::DeliverShortCircuitedFindMainResponse( | 760 void AppCacheStorageImpl::DeliverShortCircuitedFindMainResponse( |
| 761 const GURL& url, AppCacheEntry found_entry, | 761 const GURL& url, AppCacheEntry found_entry, |
| 762 scoped_refptr<AppCacheGroup> group, scoped_refptr<AppCache> cache, | 762 scoped_refptr<AppCacheGroup> group, scoped_refptr<AppCache> cache, |
| 763 scoped_refptr<DelegateReference> delegate_ref) { | 763 scoped_refptr<DelegateReference> delegate_ref) { |
| 764 if (delegate_ref->delegate) { | 764 if (delegate_ref->delegate) { |
| 765 delegate_ref->delegate->OnMainResponseFound( | 765 delegate_ref->delegate->OnMainResponseFound( |
| 766 url, found_entry, AppCacheEntry(), | 766 url, found_entry, AppCacheEntry(), |
| 767 cache.get() ? cache->cache_id() : kNoCacheId, | 767 cache.get() ? cache->cache_id() : kNoCacheId, |
| 768 group.get() ? group->manifest_url() : GURL::EmptyGURL()); | 768 group.get() ? group->manifest_url() : GURL()); |
| 769 } | 769 } |
| 770 } | 770 } |
| 771 | 771 |
| 772 void AppCacheStorageImpl::FindResponseForSubRequest( | 772 void AppCacheStorageImpl::FindResponseForSubRequest( |
| 773 AppCache* cache, const GURL& url, | 773 AppCache* cache, const GURL& url, |
| 774 AppCacheEntry* found_entry, AppCacheEntry* found_fallback_entry, | 774 AppCacheEntry* found_entry, AppCacheEntry* found_fallback_entry, |
| 775 bool* found_network_namespace) { | 775 bool* found_network_namespace) { |
| 776 DCHECK(cache && cache->is_complete()); | 776 DCHECK(cache && cache->is_complete()); |
| 777 GURL fallback_namespace_not_used; | 777 GURL fallback_namespace_not_used; |
| 778 cache->FindResponseForRequest( | 778 cache->FindResponseForRequest( |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 871 } else { | 871 } else { |
| 872 // TODO(michaeln): create a disk backed backend | 872 // TODO(michaeln): create a disk backed backend |
| 873 disk_cache_.reset( | 873 disk_cache_.reset( |
| 874 disk_cache::CreateInMemoryCacheBackend(kMaxDiskCacheSize)); | 874 disk_cache::CreateInMemoryCacheBackend(kMaxDiskCacheSize)); |
| 875 } | 875 } |
| 876 } | 876 } |
| 877 return disk_cache_.get(); | 877 return disk_cache_.get(); |
| 878 } | 878 } |
| 879 | 879 |
| 880 } // namespace appcache | 880 } // namespace appcache |
| OLD | NEW |