| OLD | NEW |
| 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 416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 427 return false; | 427 return false; |
| 428 | 428 |
| 429 return true; | 429 return true; |
| 430 } | 430 } |
| 431 | 431 |
| 432 void DocumentLoader::responseReceived(Resource* resource, const ResourceResponse
& response) | 432 void DocumentLoader::responseReceived(Resource* resource, const ResourceResponse
& response) |
| 433 { | 433 { |
| 434 ASSERT_UNUSED(resource, m_mainResource == resource); | 434 ASSERT_UNUSED(resource, m_mainResource == resource); |
| 435 RefPtr<DocumentLoader> protect(this); | 435 RefPtr<DocumentLoader> protect(this); |
| 436 | 436 |
| 437 frameLoader()->onResponseReceived(); |
| 438 |
| 437 m_applicationCacheHost->didReceiveResponseForMainResource(response); | 439 m_applicationCacheHost->didReceiveResponseForMainResource(response); |
| 438 | 440 |
| 439 // The memory cache doesn't understand the application cache or its caching
rules. So if a main resource is served | 441 // The memory cache doesn't understand the application cache or its caching
rules. So if a main resource is served |
| 440 // from the application cache, ensure we don't save the result for future us
e. All responses loaded | 442 // from the application cache, ensure we don't save the result for future us
e. All responses loaded |
| 441 // from appcache will have a non-zero appCacheID(). | 443 // from appcache will have a non-zero appCacheID(). |
| 442 if (response.appCacheID()) | 444 if (response.appCacheID()) |
| 443 memoryCache()->remove(m_mainResource.get()); | 445 memoryCache()->remove(m_mainResource.get()); |
| 444 | 446 |
| 445 DEFINE_STATIC_LOCAL(AtomicString, xFrameOptionHeader, ("x-frame-options", At
omicString::ConstructFromLiteral)); | 447 DEFINE_STATIC_LOCAL(AtomicString, xFrameOptionHeader, ("x-frame-options", At
omicString::ConstructFromLiteral)); |
| 446 HTTPHeaderMap::const_iterator it = response.httpHeaderFields().find(xFrameOp
tionHeader); | 448 HTTPHeaderMap::const_iterator it = response.httpHeaderFields().find(xFrameOp
tionHeader); |
| (...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 841 void DocumentLoader::replaceDocument(const String& source, Document* ownerDocume
nt) | 843 void DocumentLoader::replaceDocument(const String& source, Document* ownerDocume
nt) |
| 842 { | 844 { |
| 843 m_frame->loader().stopAllLoaders(); | 845 m_frame->loader().stopAllLoaders(); |
| 844 m_writer = createWriterFor(m_frame, ownerDocument, m_frame->document()->url(
), mimeType(), m_writer ? m_writer->encoding() : emptyAtom, m_writer ? m_writer
->encodingWasChosenByUser() : false, true); | 846 m_writer = createWriterFor(m_frame, ownerDocument, m_frame->document()->url(
), mimeType(), m_writer ? m_writer->encoding() : emptyAtom, m_writer ? m_writer
->encodingWasChosenByUser() : false, true); |
| 845 if (!source.isNull()) | 847 if (!source.isNull()) |
| 846 m_writer->appendReplacingData(source); | 848 m_writer->appendReplacingData(source); |
| 847 endWriting(m_writer.get()); | 849 endWriting(m_writer.get()); |
| 848 } | 850 } |
| 849 | 851 |
| 850 } // namespace WebCore | 852 } // namespace WebCore |
| OLD | NEW |