Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(169)

Side by Side Diff: Source/core/loader/DocumentLoader.cpp

Issue 270283007: Implement the logic to find the correct <link> for Manifest in Document. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@link_manifest
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/core/dom/DocumentTest.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2011 Google Inc. All rights reserved. 3 * Copyright (C) 2011 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 268
269 if (!m_mainDocumentError.isNull()) 269 if (!m_mainDocumentError.isNull())
270 return; 270 return;
271 clearMainResourceLoader(); 271 clearMainResourceLoader();
272 if (!frameLoader()->stateMachine()->creatingInitialEmptyDocument()) 272 if (!frameLoader()->stateMachine()->creatingInitialEmptyDocument())
273 frameLoader()->checkLoadComplete(); 273 frameLoader()->checkLoadComplete();
274 274
275 // If the document specified an application cache manifest, it violates the author's intent if we store it in the memory cache 275 // If the document specified an application cache manifest, it violates the author's intent if we store it in the memory cache
276 // and deny the appcache the chance to intercept it in the future, so remove from the memory cache. 276 // and deny the appcache the chance to intercept it in the future, so remove from the memory cache.
277 if (m_frame) { 277 if (m_frame) {
278 if (m_mainResource && m_frame->document()->hasManifest()) 278 if (m_mainResource && m_frame->document()->hasAppCacheManifest())
279 memoryCache()->remove(m_mainResource.get()); 279 memoryCache()->remove(m_mainResource.get());
280 } 280 }
281 m_applicationCacheHost->finishedLoadingMainResource(); 281 m_applicationCacheHost->finishedLoadingMainResource();
282 clearMainResourceHandle(); 282 clearMainResourceHandle();
283 } 283 }
284 284
285 bool DocumentLoader::isRedirectAfterPost(const ResourceRequest& newRequest, cons t ResourceResponse& redirectResponse) 285 bool DocumentLoader::isRedirectAfterPost(const ResourceRequest& newRequest, cons t ResourceResponse& redirectResponse)
286 { 286 {
287 int status = redirectResponse.httpStatusCode(); 287 int status = redirectResponse.httpStatusCode();
288 if (((status >= 301 && status <= 303) || status == 307) 288 if (((status >= 301 && status <= 303) || status == 307)
(...skipping 533 matching lines...) Expand 10 before | Expand all | Expand 10 after
822 void DocumentLoader::replaceDocument(const String& source, Document* ownerDocume nt) 822 void DocumentLoader::replaceDocument(const String& source, Document* ownerDocume nt)
823 { 823 {
824 m_frame->loader().stopAllLoaders(); 824 m_frame->loader().stopAllLoaders();
825 m_writer = createWriterFor(m_frame, ownerDocument, m_frame->document()->url( ), mimeType(), m_writer ? m_writer->encoding() : emptyAtom, m_writer ? m_writer ->encodingWasChosenByUser() : false, true); 825 m_writer = createWriterFor(m_frame, ownerDocument, m_frame->document()->url( ), mimeType(), m_writer ? m_writer->encoding() : emptyAtom, m_writer ? m_writer ->encodingWasChosenByUser() : false, true);
826 if (!source.isNull()) 826 if (!source.isNull())
827 m_writer->appendReplacingData(source); 827 m_writer->appendReplacingData(source);
828 endWriting(m_writer.get()); 828 endWriting(m_writer.get());
829 } 829 }
830 830
831 } // namespace WebCore 831 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/dom/DocumentTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698