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

Unified Diff: Source/WebCore/inspector/InspectorPageAgent.cpp

Issue 7608014: Merge 92672 - Web Inspector: Resources panel does not show main resource cookies. (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/835/
Patch Set: Created 9 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/WebCore/ChangeLog ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/inspector/InspectorPageAgent.cpp
===================================================================
--- Source/WebCore/inspector/InspectorPageAgent.cpp (revision 92737)
+++ Source/WebCore/inspector/InspectorPageAgent.cpp (working copy)
@@ -360,6 +360,19 @@
return result;
}
+static Vector<KURL> allResourcesURLsForFrame(Frame* frame)
+{
+ Vector<KURL> result;
+
+ result.append(frame->loader()->documentLoader()->url());
+
+ Vector<CachedResource*> allResources = cachedResourcesForFrame(frame);
+ for (Vector<CachedResource*>::const_iterator it = allResources.begin(); it != allResources.end(); ++it)
+ result.append((*it)->url());
+
+ return result;
+}
+
void InspectorPageAgent::getCookies(ErrorString*, RefPtr<InspectorArray>* cookies, WTF::String* cookiesString)
{
// If we can get raw cookies.
@@ -375,11 +388,10 @@
for (Frame* frame = mainFrame(); frame; frame = frame->tree()->traverseNext(mainFrame())) {
Document* document = frame->document();
- Vector<CachedResource*> allResources = cachedResourcesForFrame(frame);
- for (Vector<CachedResource*>::const_iterator it = allResources.begin(); it != allResources.end(); ++it) {
+ Vector<KURL> allURLs = allResourcesURLsForFrame(frame);
+ for (Vector<KURL>::const_iterator it = allURLs.begin(); it != allURLs.end(); ++it) {
Vector<Cookie> docCookiesList;
- rawCookiesImplemented = getRawCookies(document, KURL(ParsedURLString, (*it)->url()), docCookiesList);
-
+ rawCookiesImplemented = getRawCookies(document, KURL(ParsedURLString, *it), docCookiesList);
if (!rawCookiesImplemented) {
// FIXME: We need duplication checking for the String representation of cookies.
ExceptionCode ec = 0;
@@ -410,9 +422,9 @@
if (document->url().host() != domain)
continue;
- Vector<CachedResource*> allResources = cachedResourcesForFrame(frame);
- for (Vector<CachedResource*>::const_iterator it = allResources.begin(); it != allResources.end(); ++it)
- WebCore::deleteCookie(document, KURL(ParsedURLString, (*it)->url()), cookieName);
+ Vector<KURL> allURLs = allResourcesURLsForFrame(frame);
+ for (Vector<KURL>::const_iterator it = allURLs.begin(); it != allURLs.end(); ++it)
+ WebCore::deleteCookie(document, KURL(ParsedURLString, *it), cookieName);
}
}
« no previous file with comments | « Source/WebCore/ChangeLog ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698