| Index: third_party/WebKit/Source/devtools/front_end/sdk/CookieParser.js
|
| diff --git a/third_party/WebKit/Source/devtools/front_end/sdk/CookieParser.js b/third_party/WebKit/Source/devtools/front_end/sdk/CookieParser.js
|
| index ac604a7705180aa798410af82aafd6c1d1a7ac30..54363764042490632a033da926ad00bff0ac2556 100644
|
| --- a/third_party/WebKit/Source/devtools/front_end/sdk/CookieParser.js
|
| +++ b/third_party/WebKit/Source/devtools/front_end/sdk/CookieParser.js
|
| @@ -258,7 +258,7 @@ WebInspector.Cookie.prototype = {
|
| },
|
|
|
| /**
|
| - * @return {string}
|
| + * @return {!NetworkAgent.CookieSameSite<string>}
|
| */
|
| sameSite: function()
|
| {
|
| @@ -300,7 +300,7 @@ WebInspector.Cookie.prototype = {
|
| },
|
|
|
| /**
|
| - * @return {string}
|
| + * @return {number}
|
| */
|
| expires: function()
|
| {
|
| @@ -324,6 +324,14 @@ WebInspector.Cookie.prototype = {
|
| },
|
|
|
| /**
|
| + * @return {string}
|
| + */
|
| + url: function()
|
| + {
|
| + return (this.secure() ? "https://" : "http://") + this.domain() + this.path();
|
| + },
|
| +
|
| + /**
|
| * @param {number} size
|
| */
|
| setSize: function(size)
|
| @@ -358,7 +366,7 @@ WebInspector.Cookie.prototype = {
|
|
|
| /**
|
| * @param {string} key
|
| - * @param {string=} value
|
| + * @param {string|number=} value
|
| */
|
| addAttribute: function(key, value)
|
| {
|
| @@ -370,7 +378,16 @@ WebInspector.Cookie.prototype = {
|
| */
|
| remove: function(callback)
|
| {
|
| - this._target.networkAgent().deleteCookie(this.name(), (this.secure() ? "https://" : "http://") + this.domain() + this.path(), callback);
|
| + this._target.networkAgent().deleteCookie(this.name(), this.url(), callback);
|
| + },
|
| +
|
| + save: function(callback)
|
| + {
|
| + var domain = this.domain();
|
| + // for cookies targeting single domain and no sub domains 'domain' field should be sent empty
|
| + if (!domain.startsWith("."))
|
| + domain = '';
|
| + this._target.networkAgent().setCookie(this.url(), this.name(), this.value(), domain, this.path(), this.secure(), this.httpOnly(), this.sameSite(), this.expires(), callback);
|
| }
|
| }
|
|
|
|
|