Commit 1eb5c051 authored by seokju@webkit.org's avatar seokju@webkit.org

Web Inspector: Remove 'cookiesString' output from Page.getCookies

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

Reviewed by Timothy Hatcher.

Remove 'cookiesString' output from Page.getCookies protocol.
It is no longer meaningful because it is an unused parameter.

Source/WebCore:

No new tests, no behavior change.

* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::getCookies):
* inspector/InspectorPageAgent.h:
* inspector/protocol/Page.json:

Source/WebInspectorUI:

* UserInterface/CookieStorageContentView.js:
(WebInspector.CookieStorageContentView.prototype.update):
* UserInterface/InspectorBackendCommands.js:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160203 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent b54f0aea
2013-12-05 Seokju Kwon <seokju@webkit.org>
Web Inspector: Remove 'cookiesString' output from Page.getCookies
https://bugs.webkit.org/show_bug.cgi?id=125268
Reviewed by Timothy Hatcher.
Remove 'cookiesString' output from Page.getCookies protocol.
It is no longer meaningful because it is an unused parameter.
No new tests, no behavior change.
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::getCookies):
* inspector/InspectorPageAgent.h:
* inspector/protocol/Page.json:
2013-12-05 Brian J. Burg <burg@cs.washington.edu>
Web Inspector: expose node and frame snapshot capabilities.
......@@ -528,7 +528,7 @@ static Vector<URL> allResourcesURLsForFrame(Frame* frame)
return result;
}
void InspectorPageAgent::getCookies(ErrorString*, RefPtr<TypeBuilder::Array<TypeBuilder::Page::Cookie>>& cookies, WTF::String* cookiesString)
void InspectorPageAgent::getCookies(ErrorString*, RefPtr<TypeBuilder::Array<TypeBuilder::Page::Cookie>>& cookies)
{
// If we can get raw cookies.
ListHashSet<Cookie> rawCookiesList;
......@@ -564,13 +564,10 @@ void InspectorPageAgent::getCookies(ErrorString*, RefPtr<TypeBuilder::Array<Type
}
// FIXME: Do not return empty string/empty array. Make returns optional instead. https://bugs.webkit.org/show_bug.cgi?id=80855
if (rawCookiesImplemented) {
if (rawCookiesImplemented)
cookies = buildArrayForCookies(rawCookiesList);
*cookiesString = "";
} else {
else
cookies = TypeBuilder::Array<TypeBuilder::Page::Cookie>::create();
*cookiesString = stringCookiesList.toString();
}
}
void InspectorPageAgent::deleteCookie(ErrorString*, const String& cookieName, const String& url)
......
......@@ -101,7 +101,7 @@ public:
virtual void removeScriptToEvaluateOnLoad(ErrorString*, const String& identifier);
virtual void reload(ErrorString*, const bool* optionalIgnoreCache, const String* optionalScriptToEvaluateOnLoad, const String* optionalScriptPreprocessor);
virtual void navigate(ErrorString*, const String& url);
virtual void getCookies(ErrorString*, RefPtr<TypeBuilder::Array<TypeBuilder::Page::Cookie>>& cookies, WTF::String* cookiesString);
virtual void getCookies(ErrorString*, RefPtr<TypeBuilder::Array<TypeBuilder::Page::Cookie>>& cookies);
virtual void deleteCookie(ErrorString*, const String& cookieName, const String& url);
virtual void getResourceTree(ErrorString*, RefPtr<TypeBuilder::Page::FrameResourceTree>&);
virtual void getResourceContent(ErrorString*, const String& frameId, const String& url, String* content, bool* base64Encoded);
......
......@@ -135,10 +135,9 @@
{
"name": "getCookies",
"returns": [
{ "name": "cookies", "type": "array", "items": { "$ref": "Cookie"}, "description": "Array of cookie objects." },
{ "name": "cookiesString", "type": "string", "description": "document.cookie string representation of the cookies." }
{ "name": "cookies", "type": "array", "items": { "$ref": "Cookie"}, "description": "Array of cookie objects." }
],
"description": "Returns all browser cookies. Depending on the backend support, will either return detailed cookie information in the <code>cookie</code> field or string cookie representation using <code>cookieString</code>."
"description": "Returns all browser cookies. Depending on the backend support, will return detailed cookie information in the <code>cookies</code> field."
},
{
"name": "deleteCookie",
......
2013-12-05 Seokju Kwon <seokju@webkit.org>
Web Inspector: Remove 'cookiesString' output from Page.getCookies
https://bugs.webkit.org/show_bug.cgi?id=125268
Reviewed by Timothy Hatcher.
Remove 'cookiesString' output from Page.getCookies protocol.
It is no longer meaningful because it is an unused parameter.
* UserInterface/CookieStorageContentView.js:
(WebInspector.CookieStorageContentView.prototype.update):
* UserInterface/InspectorBackendCommands.js:
2013-12-05 Brian J. Burg <burg@cs.washington.edu>
Web Inspector: expose node and frame snapshot capabilities.
......
......@@ -41,7 +41,7 @@ WebInspector.CookieStorageContentView.prototype = {
update: function()
{
function callback(error, cookies, cookiesString)
function callback(error, cookies)
{
if (error)
return;
......
......@@ -308,7 +308,7 @@ InspectorBackend.registerCommand("Page.addScriptToEvaluateOnLoad", [{"name": "sc
InspectorBackend.registerCommand("Page.removeScriptToEvaluateOnLoad", [{"name": "identifier", "type": "string", "optional": false}], []);
InspectorBackend.registerCommand("Page.reload", [{"name": "ignoreCache", "type": "boolean", "optional": true}, {"name": "scriptToEvaluateOnLoad", "type": "string", "optional": true}, {"name": "scriptPreprocessor", "type": "string", "optional": true}], []);
InspectorBackend.registerCommand("Page.navigate", [{"name": "url", "type": "string", "optional": false}], []);
InspectorBackend.registerCommand("Page.getCookies", [], ["cookies", "cookiesString"]);
InspectorBackend.registerCommand("Page.getCookies", [], ["cookies"]);
InspectorBackend.registerCommand("Page.deleteCookie", [{"name": "cookieName", "type": "string", "optional": false}, {"name": "url", "type": "string", "optional": false}], []);
InspectorBackend.registerCommand("Page.getResourceTree", [], ["frameTree"]);
InspectorBackend.registerCommand("Page.getResourceContent", [{"name": "frameId", "type": "string", "optional": false}, {"name": "url", "type": "string", "optional": false}], ["content", "base64Encoded"]);
......
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