Commit 01ddee5b authored by japhet@chromium.org's avatar japhet@chromium.org

Remove unusued WebFrameClient::willRequestResource and WebCachedURLRequest

Also, remove android's resource-request-callbacks-expected.txt,
which I missed when deleting the test in https://codereview.chromium.org/1288323006/

BUG=523091

Review URL: https://codereview.chromium.org/1309893002

git-svn-id: svn://svn.chromium.org/blink/trunk@201006 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 7147b170
main frame - img requested 'dice.png'
main frame - img requested 'dice.png'
main frame - img requested 'not-existing.png'
main frame - css requested 'gw432047.ttf'
main frame - css requested 'greenbox-hotspot35-4.cur'
main frame - css requested 'lenna.png'
main frame - img requested 'png_per_row_alpha.png'
main frame - script requested 'empty-script.js'
main frame - img requested 'mu.png'
main frame - img requested 'oval.png'
main frame - css requested 'palatted-color-png-gamma-one-color-profile.png'
This test checks that the correct callbacks for resource requests are invoked. It passes if you see the callbacks for 11 resources.
PASS
PASS successfullyParsed is true
TEST COMPLETE
/*
* Copyright (C) 2012 Google 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:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * 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.
* * Neither the name of Google Inc. nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 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 THE COPYRIGHT
* OWNER OR 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 "public/web/WebCachedURLRequest.h"
#include "core/fetch/FetchRequest.h"
#include "platform/exported/WrappedResourceRequest.h"
#include "public/platform/WebURLRequest.h"
namespace blink {
void WebCachedURLRequest::reset()
{
m_resourceRequestWrapper.reset(0);
m_private = 0;
}
const WebURLRequest& WebCachedURLRequest::urlRequest() const
{
if (!m_resourceRequestWrapper.get())
m_resourceRequestWrapper.reset(new WrappedResourceRequest(m_private->resourceRequest()));
else
m_resourceRequestWrapper->bind(m_private->resourceRequest());
return *m_resourceRequestWrapper.get();
}
WebString WebCachedURLRequest::charset() const
{
return WebString(m_private->charset());
}
bool WebCachedURLRequest::forPreload() const
{
return m_private->forPreload();
}
WebString WebCachedURLRequest::initiatorName() const
{
return WebString(m_private->options().initiatorInfo.name);
}
WebCachedURLRequest::WebCachedURLRequest(FetchRequest* request)
: m_private(request)
{
}
} // namespace blink
...@@ -111,7 +111,6 @@ ...@@ -111,7 +111,6 @@
'WebBindings.cpp', 'WebBindings.cpp',
'WebBlob.cpp', 'WebBlob.cpp',
'WebCache.cpp', 'WebCache.cpp',
'WebCachedURLRequest.cpp',
'WebColorName.cpp', 'WebColorName.cpp',
'WebColorSuggestion.cpp', 'WebColorSuggestion.cpp',
'WebCryptoNormalize.cpp', 'WebCryptoNormalize.cpp',
......
...@@ -535,7 +535,6 @@ source_set("blink_headers") { ...@@ -535,7 +535,6 @@ source_set("blink_headers") {
"web/WebKit.h", "web/WebKit.h",
"web/WebPageSerializer.h", "web/WebPageSerializer.h",
"web/WebPluginAction.h", "web/WebPluginAction.h",
"web/WebCachedURLRequest.h",
"web/WebSecurityOrigin.h", "web/WebSecurityOrigin.h",
"web/WebFrameWidget.h", "web/WebFrameWidget.h",
"web/WebColorChooser.h", "web/WebColorChooser.h",
......
/*
* Copyright (C) 2012 Google 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:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * 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.
* * Neither the name of Google Inc. nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 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 THE COPYRIGHT
* OWNER OR 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 WebCachedURLRequest_h
#define WebCachedURLRequest_h
#include "../platform/WebCommon.h"
#include "../platform/WebPrivateOwnPtr.h"
#include "../platform/WebString.h"
namespace blink {
class FetchRequest;
class WebString;
class WebURLRequest;
class WrappedResourceRequest;
class WebCachedURLRequest {
public:
~WebCachedURLRequest() { reset(); }
BLINK_EXPORT void reset();
BLINK_EXPORT const WebURLRequest& urlRequest() const;
BLINK_EXPORT WebString charset() const;
BLINK_EXPORT bool forPreload() const;
BLINK_EXPORT WebString initiatorName() const;
#if BLINK_IMPLEMENTATION
explicit WebCachedURLRequest(FetchRequest*);
#endif
private:
WebCachedURLRequest(const WebCachedURLRequest&);
WebCachedURLRequest& operator=(const WebCachedURLRequest&);
FetchRequest* m_private;
mutable WebPrivateOwnPtr<WrappedResourceRequest> m_resourceRequestWrapper;
};
} // namespace blink
#endif
...@@ -61,7 +61,6 @@ class WebApplicationCacheHost; ...@@ -61,7 +61,6 @@ class WebApplicationCacheHost;
class WebApplicationCacheHostClient; class WebApplicationCacheHostClient;
class WebAppBannerClient; class WebAppBannerClient;
class WebBluetooth; class WebBluetooth;
class WebCachedURLRequest;
class WebColorChooser; class WebColorChooser;
class WebColorChooserClient; class WebColorChooserClient;
class WebContentDecryptionModule; class WebContentDecryptionModule;
...@@ -412,9 +411,6 @@ public: ...@@ -412,9 +411,6 @@ public:
// Low-level resource notifications ------------------------------------ // Low-level resource notifications ------------------------------------
// An element will request a resource.
virtual void willRequestResource(WebLocalFrame*, const WebCachedURLRequest&) { }
// A request is about to be sent out, and the client may modify it. Request // A request is about to be sent out, and the client may modify it. Request
// is writable, and changes to the URL, for example, will change the request // is writable, and changes to the URL, for example, will change the request
// made. If this request is the result of a redirect, then redirectResponse // made. If this request is the result of a redirect, then redirectResponse
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment