Synchronous XMLHTTPRequests need to go to the NetworkProcess.
<rdar://problem/12951765> and https://bugs.webkit.org/show_bug.cgi?id=106826

Reviewed by Sam Weinig and Alexey Proskuryakov.

Source/WebCore:

No new tests (No changes to any config that is currently tested)

* loader/FrameLoader.cpp:
(WebCore::FrameLoader::loadResourceSynchronously): Consult the LoaderStrategy when strategies are
  being used.

* loader/LoaderStrategy.cpp:
(WebCore::LoaderStrategy::loadResourceSynchronously): Defaults to using ResourceHandle directly.
* loader/LoaderStrategy.h:

Break out the StoredCredentials enum to a new header:
* platform/network/ResourceHandle.h:
* platform/network/ResourceHandleTypes.h:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.exp.in:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:

Source/WebKit2:

* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::WebPlatformStrategies::loadResourceSynchronously): Entry point for WebCore to get
  synchronous requests to the NetworkProcess.
* WebProcess/WebCoreSupport/WebPlatformStrategies.h:

* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::performSynchronousLoad): Create a SyncNetworkResourceLoader
  and schedule it.
* NetworkProcess/NetworkConnectionToWebProcess.h:
* NetworkProcess/NetworkConnectionToWebProcess.messages.in:

* NetworkProcess/NetworkResourceLoadScheduler.cpp:
(WebKit::NetworkResourceLoadScheduler::scheduleSyncNetworkResourceLoader):
(WebKit::NetworkResourceLoadScheduler::servePendingRequestsForHost): Serve synchronous loaders
  before async loaders.
* NetworkProcess/NetworkResourceLoadScheduler.h:

A class that encapsulates a synchronous load request and the CoreIPC reply to be made once it is complete:
* NetworkProcess/SyncNetworkResourceLoader.cpp: Added.
(WebKit::SyncNetworkResourceLoader::SyncNetworkResourceLoader):
(WebKit::SyncNetworkResourceLoader::start):
* NetworkProcess/SyncNetworkResourceLoader.h: Copied from Source/WebKit2/NetworkProcess/HostRecord.h.
(WebKit::SyncNetworkResourceLoader::create):
(WebKit::SyncNetworkResourceLoader::setIdentifier):
(WebKit::SyncNetworkResourceLoader::identifier):
(WebKit::SyncNetworkResourceLoader::loadParameters):

Add a second queue of sync loaders:
* NetworkProcess/HostRecord.h:
(WebKit::HostRecord::syncLoadersPending):

Add comments to explicitly spell out the current reliance on some messages that are currently synchronous:
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::willSendRequest):
(WebKit::NetworkResourceLoader::canAuthenticateAgainstProtectionSpace):

* WebKit2.xcodeproj/project.pbxproj:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@139935 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/WebCore/GNUmakefile.list.am b/Source/WebCore/GNUmakefile.list.am
index 5cabfe2..b77f009 100644
--- a/Source/WebCore/GNUmakefile.list.am
+++ b/Source/WebCore/GNUmakefile.list.am
@@ -5811,6 +5811,7 @@
 	Source/WebCore/platform/network/ResourceHandle.cpp \
 	Source/WebCore/platform/network/ResourceHandle.h \
 	Source/WebCore/platform/network/ResourceHandleInternal.h \
+	Source/WebCore/platform/network/ResourceHandleTypes.h \
 	Source/WebCore/platform/network/ResourceLoadInfo.h \
 	Source/WebCore/platform/network/ResourceLoadPriority.h \
 	Source/WebCore/platform/network/ResourceLoadTiming.cpp \