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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/resources/CookieItemsView.js

Issue 1943443003: DevTools: Fix issue causing no cookies to be shown in the Resources > Cookies panel. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 unified diff | Download patch
« no previous file with comments | « AUTHORS ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2009 Apple Inc. All rights reserved.
3 * Copyright (C) 2009 Joseph Pecoraro 3 * Copyright (C) 2009 Joseph Pecoraro
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 var cookies = []; 118 var cookies = [];
119 var resourceURLsForDocumentURL = []; 119 var resourceURLsForDocumentURL = [];
120 this._totalSize = 0; 120 this._totalSize = 0;
121 121
122 /** 122 /**
123 * @this {WebInspector.CookieItemsView} 123 * @this {WebInspector.CookieItemsView}
124 */ 124 */
125 function populateResourcesForDocuments(resource) 125 function populateResourcesForDocuments(resource)
126 { 126 {
127 var url = resource.documentURL.asParsedURL(); 127 var url = resource.documentURL.asParsedURL();
128 if (url && url.host == this._cookieDomain) 128 if (url && url.securityOrigin() == this._cookieDomain)
129 resourceURLsForDocumentURL.push(resource.url); 129 resourceURLsForDocumentURL.push(resource.url);
130 } 130 }
131 WebInspector.forAllResources(populateResourcesForDocuments.bind(this)); 131 WebInspector.forAllResources(populateResourcesForDocuments.bind(this));
132 132
133 for (var i = 0; i < allCookies.length; ++i) { 133 for (var i = 0; i < allCookies.length; ++i) {
134 var pushed = false; 134 var pushed = false;
135 var size = allCookies[i].size(); 135 var size = allCookies[i].size();
136 for (var j = 0; j < resourceURLsForDocumentURL.length; ++j) { 136 for (var j = 0; j < resourceURLsForDocumentURL.length; ++j) {
137 var resourceURL = resourceURLsForDocumentURL[j]; 137 var resourceURL = resourceURLsForDocumentURL[j];
138 if (WebInspector.Cookies.cookieMatchesResourceURL(allCookies[i], resourceURL)) { 138 if (WebInspector.Cookies.cookieMatchesResourceURL(allCookies[i], resourceURL)) {
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 { 181 {
182 if (!this._cookies.length) { 182 if (!this._cookies.length) {
183 var contextMenu = new WebInspector.ContextMenu(event); 183 var contextMenu = new WebInspector.ContextMenu(event);
184 contextMenu.appendItem(WebInspector.UIString("Refresh"), this._updat e.bind(this)); 184 contextMenu.appendItem(WebInspector.UIString("Refresh"), this._updat e.bind(this));
185 contextMenu.show(); 185 contextMenu.show();
186 } 186 }
187 }, 187 },
188 188
189 __proto__: WebInspector.VBox.prototype 189 __proto__: WebInspector.VBox.prototype
190 } 190 }
OLDNEW
« no previous file with comments | « AUTHORS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698