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

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

Issue 1170503003: Remove resource type-specific fetching logic from ResourceFetcher (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 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 | Annotate | Revision Log
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 672 matching lines...) Expand 10 before | Expand all | Expand 10 after
683 if (!m_frame || m_request.isNull()) 683 if (!m_frame || m_request.isNull())
684 return; 684 return;
685 685
686 m_applicationCacheHost->willStartLoadingMainResource(m_request); 686 m_applicationCacheHost->willStartLoadingMainResource(m_request);
687 prepareSubframeArchiveLoadIfNeeded(); 687 prepareSubframeArchiveLoadIfNeeded();
688 688
689 ResourceRequest request(m_request); 689 ResourceRequest request(m_request);
690 DEFINE_STATIC_LOCAL(ResourceLoaderOptions, mainResourceLoadOptions, 690 DEFINE_STATIC_LOCAL(ResourceLoaderOptions, mainResourceLoadOptions,
691 (DoNotBufferData, AllowStoredCredentials, ClientRequestedCredentials, Ch eckContentSecurityPolicy, DocumentContext)); 691 (DoNotBufferData, AllowStoredCredentials, ClientRequestedCredentials, Ch eckContentSecurityPolicy, DocumentContext));
692 FetchRequest cachedResourceRequest(request, FetchInitiatorTypeNames::documen t, mainResourceLoadOptions); 692 FetchRequest cachedResourceRequest(request, FetchInitiatorTypeNames::documen t, mainResourceLoadOptions);
693 m_mainResource = m_fetcher->fetchMainResource(cachedResourceRequest, m_subst ituteData); 693 m_mainResource = RawResource::fetchMainResource(cachedResourceRequest, fetch er(), m_substituteData);
694 if (!m_mainResource) { 694 if (!m_mainResource) {
695 m_request = ResourceRequest(); 695 m_request = ResourceRequest();
696 // If the load was aborted by clearing m_request, it's possible the Appl icationCacheHost 696 // If the load was aborted by clearing m_request, it's possible the Appl icationCacheHost
697 // is now in a state where starting an empty load will be inconsistent. Replace it with 697 // is now in a state where starting an empty load will be inconsistent. Replace it with
698 // a new ApplicationCacheHost. 698 // a new ApplicationCacheHost.
699 m_applicationCacheHost = ApplicationCacheHost::create(this); 699 m_applicationCacheHost = ApplicationCacheHost::create(this);
700 maybeLoadEmpty(); 700 maybeLoadEmpty();
701 return; 701 return;
702 } 702 }
703 m_mainResource->addClient(this); 703 m_mainResource->addClient(this);
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
772 // This is only called by FrameLoader::replaceDocumentWhileExecutingJavaScriptUR L() 772 // This is only called by FrameLoader::replaceDocumentWhileExecutingJavaScriptUR L()
773 void DocumentLoader::replaceDocumentWhileExecutingJavaScriptURL(const DocumentIn it& init, const String& source, Document* ownerDocument) 773 void DocumentLoader::replaceDocumentWhileExecutingJavaScriptURL(const DocumentIn it& init, const String& source, Document* ownerDocument)
774 { 774 {
775 m_writer = createWriterFor(ownerDocument, init, mimeType(), m_writer ? m_wri ter->encoding() : emptyAtom, true, ForceSynchronousParsing); 775 m_writer = createWriterFor(ownerDocument, init, mimeType(), m_writer ? m_wri ter->encoding() : emptyAtom, true, ForceSynchronousParsing);
776 if (!source.isNull()) 776 if (!source.isNull())
777 m_writer->appendReplacingData(source); 777 m_writer->appendReplacingData(source);
778 endWriting(m_writer.get()); 778 endWriting(m_writer.get());
779 } 779 }
780 780
781 } // namespace blink 781 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698