Commit d17b787d authored by pfeldman@chromium.org's avatar pfeldman@chromium.org

2010-02-04 Pavel Feldman <pfeldman@chromium.org>

        Reviewed by Timothy Hatcher.

        Web Inspector: Cookies for resources are not shown in storage panel.

        https://bugs.webkit.org/show_bug.cgi?id=34594

        * inspector/InspectorController.cpp:
        (WebCore::InspectorController::getCookies):
        * inspector/InspectorResource.cpp:
        (WebCore::InspectorResource::updateScriptObject):
        (WebCore::InspectorResource::cachedResource):
        * inspector/InspectorResource.h:
        (WebCore::InspectorResource::requestURL):


git-svn-id: svn://svn.chromium.org/blink/trunk@54343 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 7523d09c
2010-02-04 Pavel Feldman <pfeldman@chromium.org>
Reviewed by Timothy Hatcher.
Web Inspector: Cookies for resources are not shown in storage panel.
https://bugs.webkit.org/show_bug.cgi?id=34594
* inspector/InspectorController.cpp:
(WebCore::InspectorController::getCookies):
* inspector/InspectorResource.cpp:
(WebCore::InspectorResource::updateScriptObject):
(WebCore::InspectorResource::cachedResource):
* inspector/InspectorResource.h:
(WebCore::InspectorResource::requestURL):
2010-02-04 Anton Muhin <antonm@chromium.org> 2010-02-04 Anton Muhin <antonm@chromium.org>
Reviewed by Adam Barth. Reviewed by Adam Barth.
......
...@@ -1180,7 +1180,7 @@ void InspectorController::getCookies(long callId) ...@@ -1180,7 +1180,7 @@ void InspectorController::getCookies(long callId)
for (ResourcesMap::iterator it = m_resources.begin(); it != resourcesEnd; ++it) { for (ResourcesMap::iterator it = m_resources.begin(); it != resourcesEnd; ++it) {
Document* document = it->second->frame()->document(); Document* document = it->second->frame()->document();
Vector<Cookie> docCookiesList; Vector<Cookie> docCookiesList;
rawCookiesImplemented = getRawCookies(document, document->cookieURL(), docCookiesList); rawCookiesImplemented = getRawCookies(document, it->second->requestURL(), docCookiesList);
if (!rawCookiesImplemented) { if (!rawCookiesImplemented) {
// FIXME: We need duplication checking for the String representation of cookies. // FIXME: We need duplication checking for the String representation of cookies.
......
...@@ -147,7 +147,7 @@ void InspectorResource::updateScriptObject(InspectorFrontend* frontend) ...@@ -147,7 +147,7 @@ void InspectorResource::updateScriptObject(InspectorFrontend* frontend)
ScriptObject jsonObject = frontend->newScriptObject(); ScriptObject jsonObject = frontend->newScriptObject();
if (m_changes.hasChange(RequestChange)) { if (m_changes.hasChange(RequestChange)) {
jsonObject.set("url", requestURL()); jsonObject.set("url", m_requestURL.string());
jsonObject.set("documentURL", m_frame->document()->url().string()); jsonObject.set("documentURL", m_frame->document()->url().string());
jsonObject.set("host", m_requestURL.host()); jsonObject.set("host", m_requestURL.host());
jsonObject.set("path", m_requestURL.path()); jsonObject.set("path", m_requestURL.path());
...@@ -231,7 +231,7 @@ CachedResource* InspectorResource::cachedResource() const ...@@ -231,7 +231,7 @@ CachedResource* InspectorResource::cachedResource() const
// Try hard to find a corresponding CachedResource. During preloading, DocLoader may not have the resource in document resources set yet, // Try hard to find a corresponding CachedResource. During preloading, DocLoader may not have the resource in document resources set yet,
// but Inspector will already try to fetch data that is only available via CachedResource (and it won't update once the resource is added, // but Inspector will already try to fetch data that is only available via CachedResource (and it won't update once the resource is added,
// because m_changes will not have the appropriate bits set). // because m_changes will not have the appropriate bits set).
const String& url = requestURL(); const String& url = m_requestURL.string();
CachedResource* cachedResource = m_frame->document()->docLoader()->cachedResource(url); CachedResource* cachedResource = m_frame->document()->docLoader()->cachedResource(url);
if (!cachedResource) if (!cachedResource)
cachedResource = cache()->resourceForURL(url); cachedResource = cache()->resourceForURL(url);
......
...@@ -92,7 +92,7 @@ namespace WebCore { ...@@ -92,7 +92,7 @@ namespace WebCore {
bool isSameLoader(DocumentLoader* loader) const { return loader == m_loader; } bool isSameLoader(DocumentLoader* loader) const { return loader == m_loader; }
void markMainResource() { m_isMainResource = true; } void markMainResource() { m_isMainResource = true; }
unsigned long identifier() const { return m_identifier; } unsigned long identifier() const { return m_identifier; }
String requestURL() const { return m_requestURL.string(); } KURL requestURL() const { return m_requestURL; }
Frame* frame() const { return m_frame.get(); } Frame* frame() const { return m_frame.get(); }
const String& mimeType() const { return m_mimeType; } const String& mimeType() const { return m_mimeType; }
const HTTPHeaderMap& requestHeaderFields() const { return m_requestHeaderFields; } const HTTPHeaderMap& requestHeaderFields() const { return m_requestHeaderFields; }
......
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