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

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

Issue 374053002: Oilpan: move MHTML objects to the heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Make MHTMLArchive.h self-contained/closed. Created 6 years, 5 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/loader/DocumentLoader.h ('k') | Source/platform/mhtml/ArchiveResource.h » ('j') | 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 #include "core/loader/UniqueIdentifier.h" 45 #include "core/loader/UniqueIdentifier.h"
46 #include "core/loader/appcache/ApplicationCacheHost.h" 46 #include "core/loader/appcache/ApplicationCacheHost.h"
47 #include "core/frame/LocalDOMWindow.h" 47 #include "core/frame/LocalDOMWindow.h"
48 #include "core/frame/LocalFrame.h" 48 #include "core/frame/LocalFrame.h"
49 #include "core/frame/csp/ContentSecurityPolicy.h" 49 #include "core/frame/csp/ContentSecurityPolicy.h"
50 #include "core/page/FrameTree.h" 50 #include "core/page/FrameTree.h"
51 #include "core/page/Page.h" 51 #include "core/page/Page.h"
52 #include "core/frame/Settings.h" 52 #include "core/frame/Settings.h"
53 #include "platform/Logging.h" 53 #include "platform/Logging.h"
54 #include "platform/UserGestureIndicator.h" 54 #include "platform/UserGestureIndicator.h"
55 #include "platform/mhtml/ArchiveResource.h"
55 #include "platform/mhtml/ArchiveResourceCollection.h" 56 #include "platform/mhtml/ArchiveResourceCollection.h"
56 #include "platform/mhtml/MHTMLArchive.h" 57 #include "platform/mhtml/MHTMLArchive.h"
57 #include "platform/plugins/PluginData.h" 58 #include "platform/plugins/PluginData.h"
58 #include "platform/weborigin/SchemeRegistry.h" 59 #include "platform/weborigin/SchemeRegistry.h"
59 #include "platform/weborigin/SecurityPolicy.h" 60 #include "platform/weborigin/SecurityPolicy.h"
60 #include "public/platform/Platform.h" 61 #include "public/platform/Platform.h"
61 #include "public/platform/WebMimeRegistry.h" 62 #include "public/platform/WebMimeRegistry.h"
62 #include "public/platform/WebThreadedDataReceiver.h" 63 #include "public/platform/WebThreadedDataReceiver.h"
63 #include "wtf/Assertions.h" 64 #include "wtf/Assertions.h"
64 #include "wtf/text/WTFString.h" 65 #include "wtf/text/WTFString.h"
(...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after
615 document()->enforceSandboxFlags(SandboxAll); 616 document()->enforceSandboxFlags(SandboxAll);
616 617
617 commitData(mainResource->data()->data(), mainResource->data()->size()); 618 commitData(mainResource->data()->data(), mainResource->data()->size());
618 return true; 619 return true;
619 } 620 }
620 621
621 void DocumentLoader::addAllArchiveResources(MHTMLArchive* archive) 622 void DocumentLoader::addAllArchiveResources(MHTMLArchive* archive)
622 { 623 {
623 ASSERT(archive); 624 ASSERT(archive);
624 if (!m_archiveResourceCollection) 625 if (!m_archiveResourceCollection)
625 m_archiveResourceCollection = adoptPtr(new ArchiveResourceCollection); 626 m_archiveResourceCollection = ArchiveResourceCollection::create();
626 m_archiveResourceCollection->addAllResources(archive); 627 m_archiveResourceCollection->addAllResources(archive);
627 } 628 }
628 629
629 void DocumentLoader::prepareSubframeArchiveLoadIfNeeded() 630 void DocumentLoader::prepareSubframeArchiveLoadIfNeeded()
630 { 631 {
631 if (!m_frame->tree().parent() || !m_frame->tree().parent()->isLocalFrame()) 632 if (!m_frame->tree().parent() || !m_frame->tree().parent()->isLocalFrame())
632 return; 633 return;
633 634
634 ArchiveResourceCollection* parentCollection = toLocalFrame(m_frame->tree().p arent())->loader().documentLoader()->m_archiveResourceCollection.get(); 635 ArchiveResourceCollection* parentCollection = toLocalFrame(m_frame->tree().p arent())->loader().documentLoader()->m_archiveResourceCollection.get();
635 if (!parentCollection) 636 if (!parentCollection)
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
828 void DocumentLoader::replaceDocument(const String& source, Document* ownerDocume nt) 829 void DocumentLoader::replaceDocument(const String& source, Document* ownerDocume nt)
829 { 830 {
830 m_frame->loader().stopAllLoaders(); 831 m_frame->loader().stopAllLoaders();
831 m_writer = createWriterFor(m_frame, ownerDocument, m_frame->document()->url( ), mimeType(), m_writer ? m_writer->encoding() : emptyAtom, m_writer ? m_writer ->encodingWasChosenByUser() : false, true); 832 m_writer = createWriterFor(m_frame, ownerDocument, m_frame->document()->url( ), mimeType(), m_writer ? m_writer->encoding() : emptyAtom, m_writer ? m_writer ->encodingWasChosenByUser() : false, true);
832 if (!source.isNull()) 833 if (!source.isNull())
833 m_writer->appendReplacingData(source); 834 m_writer->appendReplacingData(source);
834 endWriting(m_writer.get()); 835 endWriting(m_writer.get());
835 } 836 }
836 837
837 } // namespace WebCore 838 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/loader/DocumentLoader.h ('k') | Source/platform/mhtml/ArchiveResource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698