Remove the source files for NetworkRequest from the repository.
They were obsoleted and removed from the project file awhile ago, but I forgot to nuke the source.

Unreviewed.

* NetworkProcess/NetworkRequest.cpp: Removed.
* NetworkProcess/NetworkRequest.h: Removed.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135187 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/WebKit2/ChangeLog b/Source/WebKit2/ChangeLog
index 29d3efc..867389d 100644
--- a/Source/WebKit2/ChangeLog
+++ b/Source/WebKit2/ChangeLog
@@ -1,5 +1,15 @@
 2012-11-19  Brady Eidson  <beidson@apple.com>
 
+        Remove the source files for NetworkRequest from the repository.
+        They were obsoleted and removed from the project file awhile ago, but I forgot to nuke the source.
+
+        Unreviewed.
+
+        * NetworkProcess/NetworkRequest.cpp: Removed.
+        * NetworkProcess/NetworkRequest.h: Removed.
+
+2012-11-19  Brady Eidson  <beidson@apple.com>
+
         Add 64-bit specializations for atomicIncrement and atomicDecrement
         https://bugs.webkit.org/show_bug.cgi?id=102702
 
diff --git a/Source/WebKit2/NetworkProcess/NetworkRequest.cpp b/Source/WebKit2/NetworkProcess/NetworkRequest.cpp
deleted file mode 100644
index aba9a55..0000000
--- a/Source/WebKit2/NetworkProcess/NetworkRequest.cpp
+++ /dev/null
@@ -1,323 +0,0 @@
-/*
- * Copyright (C) 2012 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "NetworkRequest.h"
-
-#if ENABLE(NETWORK_PROCESS)
-
-#include "BlockingResponseMap.h"
-#include "Logging.h"
-#include "NetworkConnectionToWebProcess.h"
-#include "NetworkProcess.h"
-#include "NetworkProcessConnectionMessages.h"
-#include "RemoteNetworkingContext.h"
-#include "SharedMemory.h"
-#include "WebCoreArgumentCoders.h"
-#include <WebCore/NotImplemented.h>
-#include <WebCore/ResourceBuffer.h>
-#include <WebCore/ResourceHandle.h>
-#include <wtf/MainThread.h>
-
-using namespace WebCore;
-
-namespace WebKit {
-
-NetworkRequest::NetworkRequest(const WebCore::ResourceRequest& request, ResourceLoadIdentifier identifier, ContentSniffingPolicy contentSniffingPolicy, NetworkConnectionToWebProcess* connection)
-    : m_request(request)
-    , m_identifier(identifier)
-    , m_contentSniffingPolicy(contentSniffingPolicy)
-    , m_connection(connection)
-{
-    ASSERT(isMainThread());
-    connection->registerObserver(this);
-}
-
-NetworkRequest::~NetworkRequest()
-{
-    ASSERT(isMainThread());
-
-    if (m_connection)
-        m_connection->unregisterObserver(this);
-}
-
-void NetworkRequest::start()
-{
-    ASSERT(isMainThread());
-
-    // Explicit ref() balanced by a deref() in NetworkRequest::stop()
-    ref();
-    
-    // FIXME (NetworkProcess): Create RemoteNetworkingContext with actual settings.
-    m_networkingContext = RemoteNetworkingContext::create(false, false);
-
-    // FIXME (NetworkProcess): Pass an actual value for defersLoading
-    m_handle = ResourceHandle::create(m_networkingContext.get(), m_request, this, false /* defersLoading */, m_contentSniffingPolicy == SniffContent);
-}
-
-static bool stopRequestsCalled = false;
-
-static Mutex& requestsToStopMutex()
-{
-    DEFINE_STATIC_LOCAL(Mutex, mutex, ());
-    return mutex;
-}
-
-static HashSet<NetworkRequest*>& requestsToStop()
-{
-    DEFINE_STATIC_LOCAL(HashSet<NetworkRequest*>, requests, ());
-    return requests;
-}
-
-void NetworkRequest::scheduleStopOnMainThread()
-{
-    MutexLocker locker(requestsToStopMutex());
-
-    requestsToStop().add(this);
-    if (!stopRequestsCalled) {
-        stopRequestsCalled = true;
-        callOnMainThread(NetworkRequest::performStops, 0);
-    }
-}
-
-void NetworkRequest::performStops(void*)
-{
-    ASSERT(stopRequestsCalled);
-
-    Vector<NetworkRequest*> requests;
-    {
-        MutexLocker locker(requestsToStopMutex());
-        copyToVector(requestsToStop(), requests);
-        requestsToStop().clear();
-        stopRequestsCalled = false;
-    }
-    
-    for (size_t i = 0; i < requests.size(); ++i)
-        requests[i]->stop();
-}
-
-void NetworkRequest::stop()
-{
-    ASSERT(isMainThread());
-
-    // Remove this load identifier soon so we can start more network requests.
-    NetworkProcess::shared().networkResourceLoadScheduler().scheduleRemoveLoadIdentifier(m_identifier);
-    
-    // Explicit deref() balanced by a ref() in NetworkRequest::stop()
-    // This might cause the NetworkRequest to be destroyed and therefore we do it last.
-    deref();
-}
-
-void NetworkRequest::connectionToWebProcessDidClose(NetworkConnectionToWebProcess* connection)
-{
-    ASSERT_ARG(connection, connection == m_connection.get());
-    m_connection->unregisterObserver(this);
-    m_connection = 0;
-}
-
-void NetworkRequest::didReceiveResponse(ResourceHandle*, const ResourceResponse& response)
-{
-    // FIXME (NetworkProcess): Cache the response.
-    connectionToWebProcess()->connection()->send(Messages::NetworkProcessConnection::DidReceiveResponse(m_identifier, response), 0);
-}
-
-void NetworkRequest::didReceiveData(ResourceHandle*, const char* data, int length, int /*encodedDataLength*/)
-{
-    // FIXME (NetworkProcess): We have to progressively notify the WebProcess as data is received.
-    if (!m_buffer)
-        m_buffer = ResourceBuffer::create();
-    m_buffer->append(data, length);
-}
-
-void NetworkRequest::didFinishLoading(ResourceHandle*, double finishTime)
-{
-    // FIXME (NetworkProcess): Currently this callback can come in on a non-main thread.
-    // This is okay for now since resource buffers are per-NetworkRequest.
-    // Once we manage memory in an actual memory cache that also includes SharedMemory blocks this will get complicated.
-    // Maybe we should marshall it to the main thread?
-
-    ShareableResource::Handle handle;
-
-    if (m_buffer && m_buffer->size()) {
-        // FIXME (NetworkProcess): We shouldn't be creating this SharedMemory on demand here.
-        // SharedMemory blocks need to be managed as part of the cache backing store.
-        RefPtr<SharedMemory> sharedBuffer = SharedMemory::create(m_buffer->size());
-        memcpy(sharedBuffer->data(), m_buffer->data(), m_buffer->size());
-
-        RefPtr<ShareableResource> shareableResource = ShareableResource::create(sharedBuffer.release(), 0, m_buffer->size());
-
-        // FIXME (NetworkProcess): Handle errors from createHandle();
-        if (!shareableResource->createHandle(handle))
-            LOG_ERROR("Failed to create handle to shareable resource memory\n");
-    }
-
-    connectionToWebProcess()->connection()->send(Messages::NetworkProcessConnection::DidReceiveResource(m_identifier, handle, finishTime), 0);
-    scheduleStopOnMainThread();
-}
-
-void NetworkRequest::didFail(ResourceHandle*, const ResourceError& error)
-{
-    connectionToWebProcess()->connection()->send(Messages::NetworkProcessConnection::DidFailResourceLoad(m_identifier, error), 0);
-    scheduleStopOnMainThread();
-}
-
-// FIXME (NetworkProcess): Many of the following ResourceHandleClient methods definitely need implementations. A few will not.
-// Once we know what they are they can be removed.
-
-
-static BlockingResponseMap<ResourceRequest*>& responseMap()
-{
-    AtomicallyInitializedStatic(BlockingResponseMap<ResourceRequest*>&, responseMap = *new BlockingResponseMap<ResourceRequest*>);
-    return responseMap;
-}
-
-static uint64_t generateWillSendRequestID()
-{
-    static int64_t uniqueWillSendRequestID;
-    return OSAtomicIncrement64Barrier(&uniqueWillSendRequestID);
-}
-
-void didReceiveWillSendRequestHandled(uint64_t requestID, const ResourceRequest& request)
-{
-    responseMap().didReceiveResponse(requestID, adoptPtr(new ResourceRequest(request)));
-}
-
-void NetworkRequest::willSendRequest(ResourceHandle*, ResourceRequest& request, const ResourceResponse& redirectResponse)
-{
-    // We only expect to get the willSendRequest callback from ResourceHandle as the result of a redirect
-    ASSERT(!redirectResponse.isNull());
-
-    uint64_t requestID = generateWillSendRequestID();
-
-    if (!connectionToWebProcess()->connection()->send(Messages::NetworkProcessConnection::WillSendRequest(requestID, m_identifier, request, redirectResponse), 0)) {
-        // FIXME (NetworkProcess): What should we do if we can't send the message?
-        return;
-    }
-    
-    OwnPtr<ResourceRequest> newRequest = responseMap().waitForResponse(requestID);
-    request = *newRequest;
-
-    NetworkProcess::shared().networkResourceLoadScheduler().receivedRedirect(m_identifier, request.url());
-}
-
-void NetworkRequest::didSendData(WebCore::ResourceHandle*, unsigned long long /*bytesSent*/, unsigned long long /*totalBytesToBeSent*/)
-{
-    notImplemented();
-}
-
-void NetworkRequest::didReceiveCachedMetadata(WebCore::ResourceHandle*, const char*, int)
-{
-    notImplemented();
-}
-
-void NetworkRequest::wasBlocked(WebCore::ResourceHandle*)
-{
-    notImplemented();
-}
-
-void NetworkRequest::cannotShowURL(WebCore::ResourceHandle*)
-{
-    notImplemented();
-}
-
-void NetworkRequest::willCacheResponse(WebCore::ResourceHandle*, WebCore::CacheStoragePolicy&)
-{
-    notImplemented();
-}
-
-bool NetworkRequest::shouldUseCredentialStorage(WebCore::ResourceHandle*)
-{
-    notImplemented();
-    return false;
-}
-
-void NetworkRequest::didReceiveAuthenticationChallenge(WebCore::ResourceHandle*, const WebCore::AuthenticationChallenge&)
-{
-    notImplemented();
-}
-
-void NetworkRequest::didCancelAuthenticationChallenge(WebCore::ResourceHandle*, const WebCore::AuthenticationChallenge&)
-{
-    notImplemented();
-}
-
-void NetworkRequest::receivedCancellation(WebCore::ResourceHandle*, const WebCore::AuthenticationChallenge&)
-{
-    notImplemented();
-}
-
-#if USE(PROTECTION_SPACE_AUTH_CALLBACK)
-bool NetworkRequest::canAuthenticateAgainstProtectionSpace(WebCore::ResourceHandle*, const WebCore::ProtectionSpace&)
-{
-    notImplemented();
-    return false;
-}
-#endif
-
-#if HAVE(NETWORK_CFDATA_ARRAY_CALLBACK)
-bool NetworkRequest::supportsDataArray()
-{
-    notImplemented();
-    return false;
-}
-
-void NetworkRequest::didReceiveDataArray(WebCore::ResourceHandle*, CFArrayRef)
-{
-    notImplemented();
-}
-#endif
-
-#if PLATFORM(MAC)
-#if USE(CFNETWORK)
-CFCachedURLResponseRef NetworkRequest::willCacheResponse(WebCore::ResourceHandle*, CFCachedURLResponseRef response)
-{
-    notImplemented();
-    return response;
-}
-#else
-NSCachedURLResponse* NetworkRequest::willCacheResponse(WebCore::ResourceHandle*, NSCachedURLResponse* response)
-{
-    notImplemented();
-    return response;
-}
-#endif
-
-void NetworkRequest::willStopBufferingData(WebCore::ResourceHandle*, const char*, int)
-{
-    notImplemented();
-}
-#endif // PLATFORM(MAC)
-
-#if ENABLE(BLOB)
-WebCore::AsyncFileStream* NetworkRequest::createAsyncFileStream(WebCore::FileStreamClient*)
-{
-    notImplemented();
-    return 0;
-}
-#endif
-
-} // namespace WebKit
-
-#endif // ENABLE(NETWORK_PROCESS)
diff --git a/Source/WebKit2/NetworkProcess/NetworkRequest.h b/Source/WebKit2/NetworkProcess/NetworkRequest.h
deleted file mode 100644
index fd38e07..0000000
--- a/Source/WebKit2/NetworkProcess/NetworkRequest.h
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- * Copyright (C) 2012 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef NetworkRequest_h
-#define NetworkRequest_h
-
-#if ENABLE(NETWORK_PROCESS)
-
-#include "NetworkConnectionToWebProcess.h"
-#include <WebCore/ResourceHandleClient.h>
-#include <WebCore/ResourceLoaderOptions.h>
-#include <WebCore/ResourceRequest.h>
-
-namespace WebCore {
-class ResourceBuffer;
-class ResourceHandle;
-}
-
-namespace WebKit {
-
-class RemoteNetworkingContext;
-typedef uint64_t ResourceLoadIdentifier;
-
-class NetworkRequest : public RefCounted<NetworkRequest>, public NetworkConnectionToWebProcessObserver, public WebCore::ResourceHandleClient {
-public:
-    static RefPtr<NetworkRequest> create(const WebCore::ResourceRequest& request, ResourceLoadIdentifier identifier, WebCore::ContentSniffingPolicy contentSniffingPolicy, NetworkConnectionToWebProcess* connection)
-    {
-        return adoptRef(new NetworkRequest(request, identifier, contentSniffingPolicy, connection));
-    }
-    
-    ~NetworkRequest();
-
-    void start();
-
-    virtual void connectionToWebProcessDidClose(NetworkConnectionToWebProcess*) OVERRIDE;
-    
-    ResourceLoadIdentifier identifier() { return m_identifier; }
-    
-    NetworkConnectionToWebProcess* connectionToWebProcess() { return m_connection.get(); }
-
-    // ResourceHandleClient methods
-    virtual void willSendRequest(WebCore::ResourceHandle*, WebCore::ResourceRequest&, const WebCore::ResourceResponse& /*redirectResponse*/) OVERRIDE;
-    virtual void didSendData(WebCore::ResourceHandle*, unsigned long long /*bytesSent*/, unsigned long long /*totalBytesToBeSent*/) OVERRIDE;
-    virtual void didReceiveResponse(WebCore::ResourceHandle*, const WebCore::ResourceResponse&) OVERRIDE;
-    virtual void didReceiveData(WebCore::ResourceHandle*, const char*, int, int /*encodedDataLength*/) OVERRIDE;
-    virtual void didReceiveCachedMetadata(WebCore::ResourceHandle*, const char*, int) OVERRIDE;
-    virtual void didFinishLoading(WebCore::ResourceHandle*, double /*finishTime*/) OVERRIDE;
-    virtual void didFail(WebCore::ResourceHandle*, const WebCore::ResourceError&) OVERRIDE;
-    virtual void wasBlocked(WebCore::ResourceHandle*) OVERRIDE;
-    virtual void cannotShowURL(WebCore::ResourceHandle*) OVERRIDE;
-    virtual void willCacheResponse(WebCore::ResourceHandle*, WebCore::CacheStoragePolicy&) OVERRIDE;
-    virtual bool shouldUseCredentialStorage(WebCore::ResourceHandle*) OVERRIDE;
-    virtual void didReceiveAuthenticationChallenge(WebCore::ResourceHandle*, const WebCore::AuthenticationChallenge&) OVERRIDE;
-    virtual void didCancelAuthenticationChallenge(WebCore::ResourceHandle*, const WebCore::AuthenticationChallenge&) OVERRIDE;
-    virtual void receivedCancellation(WebCore::ResourceHandle*, const WebCore::AuthenticationChallenge&) OVERRIDE;
-
-#if USE(PROTECTION_SPACE_AUTH_CALLBACK)
-    virtual bool canAuthenticateAgainstProtectionSpace(WebCore::ResourceHandle*, const WebCore::ProtectionSpace&) OVERRIDE;
-#endif
-
-#if HAVE(NETWORK_CFDATA_ARRAY_CALLBACK)
-    virtual bool supportsDataArray() OVERRIDE;
-    virtual void didReceiveDataArray(WebCore::ResourceHandle*, CFArrayRef) OVERRIDE;
-#endif
-
-#if PLATFORM(MAC)
-#if USE(CFNETWORK)
-    virtual CFCachedURLResponseRef willCacheResponse(WebCore::ResourceHandle*, CFCachedURLResponseRef) OVERRIDE;
-#else
-    virtual NSCachedURLResponse* willCacheResponse(WebCore::ResourceHandle*, NSCachedURLResponse*) OVERRIDE;
-#endif
-    virtual void willStopBufferingData(WebCore::ResourceHandle*, const char*, int) OVERRIDE;
-#endif // PLATFORM(MAC)
-
-#if ENABLE(BLOB)
-    virtual WebCore::AsyncFileStream* createAsyncFileStream(WebCore::FileStreamClient*) OVERRIDE;
-#endif
-
-private:
-    NetworkRequest(const WebCore::ResourceRequest&, ResourceLoadIdentifier, WebCore::ContentSniffingPolicy, NetworkConnectionToWebProcess*);
-
-    void scheduleStopOnMainThread();
-    static void performStops(void*);
-
-    void stop();
-
-    WebCore::ResourceRequest m_request;
-    ResourceLoadIdentifier m_identifier;
-
-    RefPtr<RemoteNetworkingContext> m_networkingContext;
-    RefPtr<WebCore::ResourceHandle> m_handle;
-    WebCore::ContentSniffingPolicy m_contentSniffingPolicy;
-    RefPtr<NetworkConnectionToWebProcess> m_connection;
-
-    // FIXME (NetworkProcess): Response data lifetime should be managed outside NetworkRequest.
-    RefPtr<WebCore::ResourceBuffer> m_buffer;
-};
-
-void didReceiveWillSendRequestHandled(uint64_t requestID, const WebCore::ResourceRequest&);
-
-} // namespace WebKit
-
-#endif // ENABLE(NETWORK_PROCESS)
-
-#endif // NetworkRequest_h