OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2008, 2009 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2008, 2009 Apple Inc. All Rights Reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 if (mainResourceCache) { | 184 if (mainResourceCache) { |
185 mainResourceCache->group()->associateDocumentLoaderWithCache(documentLoa
der, mainResourceCache); | 185 mainResourceCache->group()->associateDocumentLoaderWithCache(documentLoa
der, mainResourceCache); |
186 mainResourceCache->group()->update(frame, ApplicationCacheUpdateWithBrow
singContext); | 186 mainResourceCache->group()->update(frame, ApplicationCacheUpdateWithBrow
singContext); |
187 } | 187 } |
188 } | 188 } |
189 | 189 |
190 void ApplicationCacheGroup::finishedLoadingMainResource(DocumentLoader* loader) | 190 void ApplicationCacheGroup::finishedLoadingMainResource(DocumentLoader* loader) |
191 { | 191 { |
192 ASSERT(m_pendingMasterResourceLoaders.contains(loader)); | 192 ASSERT(m_pendingMasterResourceLoaders.contains(loader)); |
193 ASSERT(m_completionType == None || m_pendingEntries.isEmpty()); | 193 ASSERT(m_completionType == None || m_pendingEntries.isEmpty()); |
194 const KURL& url = loader->originalURL(); | 194 const KURL& url = loader->url(); |
195 | 195 |
196 switch (m_completionType) { | 196 switch (m_completionType) { |
197 case None: | 197 case None: |
198 // The main resource finished loading before the manifest was ready. It
will be handled via dispatchMainResources() later. | 198 // The main resource finished loading before the manifest was ready. It
will be handled via dispatchMainResources() later. |
199 return; | 199 return; |
200 case NoUpdate: | 200 case NoUpdate: |
201 ASSERT(!m_cacheBeingUpdated); | 201 ASSERT(!m_cacheBeingUpdated); |
202 associateDocumentLoaderWithCache(loader, m_newestCache.get()); | 202 associateDocumentLoaderWithCache(loader, m_newestCache.get()); |
203 | 203 |
204 if (ApplicationCacheResource* resource = m_newestCache->resourceForURL(u
rl)) { | 204 if (ApplicationCacheResource* resource = m_newestCache->resourceForURL(u
rl)) { |
(...skipping 669 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
874 | 874 |
875 HashSet<ApplicationCache*>::const_iterator end = m_caches.end(); | 875 HashSet<ApplicationCache*>::const_iterator end = m_caches.end(); |
876 for (HashSet<ApplicationCache*>::const_iterator it = m_caches.begin(); it !=
end; ++it) | 876 for (HashSet<ApplicationCache*>::const_iterator it = m_caches.begin(); it !=
end; ++it) |
877 (*it)->clearStorageID(); | 877 (*it)->clearStorageID(); |
878 } | 878 } |
879 | 879 |
880 | 880 |
881 } | 881 } |
882 | 882 |
883 #endif // ENABLE(OFFLINE_WEB_APPLICATIONS) | 883 #endif // ENABLE(OFFLINE_WEB_APPLICATIONS) |
OLD | NEW |