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

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

Issue 14672042: Prepare to add more initiator info to CachedResource(Request) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 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 | 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 #include "core/loader/FormState.h" 49 #include "core/loader/FormState.h"
50 #include "core/loader/FrameLoader.h" 50 #include "core/loader/FrameLoader.h"
51 #include "core/loader/FrameLoaderClient.h" 51 #include "core/loader/FrameLoaderClient.h"
52 #include "core/loader/ResourceLoader.h" 52 #include "core/loader/ResourceLoader.h"
53 #include "core/loader/TextResourceDecoder.h" 53 #include "core/loader/TextResourceDecoder.h"
54 #include "core/loader/UniqueIdentifier.h" 54 #include "core/loader/UniqueIdentifier.h"
55 #include "core/loader/appcache/ApplicationCacheHost.h" 55 #include "core/loader/appcache/ApplicationCacheHost.h"
56 #include "core/loader/archive/ArchiveResourceCollection.h" 56 #include "core/loader/archive/ArchiveResourceCollection.h"
57 #include "core/loader/archive/MHTMLArchive.h" 57 #include "core/loader/archive/MHTMLArchive.h"
58 #include "core/loader/cache/CachedResourceLoader.h" 58 #include "core/loader/cache/CachedResourceLoader.h"
59 #include "core/loader/cache/CachedResourceRequestInitiators.h"
59 #include "core/loader/cache/MemoryCache.h" 60 #include "core/loader/cache/MemoryCache.h"
60 #include "core/page/DOMWindow.h" 61 #include "core/page/DOMWindow.h"
61 #include "core/page/Frame.h" 62 #include "core/page/Frame.h"
62 #include "core/page/FrameTree.h" 63 #include "core/page/FrameTree.h"
63 #include "core/page/Page.h" 64 #include "core/page/Page.h"
64 #include "core/page/Settings.h" 65 #include "core/page/Settings.h"
65 #include "core/platform/Logging.h" 66 #include "core/platform/Logging.h"
66 #include "weborigin/SchemeRegistry.h" 67 #include "weborigin/SchemeRegistry.h"
67 #include "weborigin/SecurityPolicy.h" 68 #include "weborigin/SecurityPolicy.h"
68 69
(...skipping 1000 matching lines...) Expand 10 before | Expand all | Expand 10 after
1069 if (m_substituteData.isValid()) { 1070 if (m_substituteData.isValid()) {
1070 m_identifierForLoadWithoutResourceLoader = createUniqueIdentifier(); 1071 m_identifierForLoadWithoutResourceLoader = createUniqueIdentifier();
1071 frameLoader()->notifier()->dispatchWillSendRequest(this, m_identifierFor LoadWithoutResourceLoader, m_request, ResourceResponse()); 1072 frameLoader()->notifier()->dispatchWillSendRequest(this, m_identifierFor LoadWithoutResourceLoader, m_request, ResourceResponse());
1072 handleSubstituteDataLoadSoon(); 1073 handleSubstituteDataLoadSoon();
1073 return; 1074 return;
1074 } 1075 }
1075 1076
1076 ResourceRequest request(m_request); 1077 ResourceRequest request(m_request);
1077 DEFINE_STATIC_LOCAL(ResourceLoaderOptions, mainResourceLoadOptions, 1078 DEFINE_STATIC_LOCAL(ResourceLoaderOptions, mainResourceLoadOptions,
1078 (SendCallbacks, SniffContent, BufferData, AllowStoredCredentials, Client RequestedCredentials, AskClientForCrossOriginCredentials, SkipSecurityCheck)); 1079 (SendCallbacks, SniffContent, BufferData, AllowStoredCredentials, Client RequestedCredentials, AskClientForCrossOriginCredentials, SkipSecurityCheck));
1079 CachedResourceRequest cachedResourceRequest(request, mainResourceLoadOptions ); 1080 CachedResourceRequest cachedResourceRequest(request, cachedResourceRequestIn itiators().document, mainResourceLoadOptions);
1080 m_mainResource = m_cachedResourceLoader->requestMainResource(cachedResourceR equest); 1081 m_mainResource = m_cachedResourceLoader->requestMainResource(cachedResourceR equest);
1081 if (!m_mainResource) { 1082 if (!m_mainResource) {
1082 setRequest(ResourceRequest()); 1083 setRequest(ResourceRequest());
1083 // If the load was aborted by clearing m_request, it's possible the Appl icationCacheHost 1084 // If the load was aborted by clearing m_request, it's possible the Appl icationCacheHost
1084 // is now in a state where starting an empty load will be inconsistent. Replace it with 1085 // is now in a state where starting an empty load will be inconsistent. Replace it with
1085 // a new ApplicationCacheHost. 1086 // a new ApplicationCacheHost.
1086 m_applicationCacheHost = adoptPtr(new ApplicationCacheHost(this)); 1087 m_applicationCacheHost = adoptPtr(new ApplicationCacheHost(this));
1087 maybeLoadEmpty(); 1088 maybeLoadEmpty();
1088 return; 1089 return;
1089 } 1090 }
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
1136 commitLoad(resourceData->data(), resourceData->size()); 1137 commitLoad(resourceData->data(), resourceData->size());
1137 } 1138 }
1138 1139
1139 void DocumentLoader::handledOnloadEvents() 1140 void DocumentLoader::handledOnloadEvents()
1140 { 1141 {
1141 m_wasOnloadHandled = true; 1142 m_wasOnloadHandled = true;
1142 applicationCacheHost()->stopDeferringEvents(); 1143 applicationCacheHost()->stopDeferringEvents();
1143 } 1144 }
1144 1145
1145 } // namespace WebCore 1146 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698