| 86 | } |
| 87 | |
| 88 | Json::Value BrowserCookie::ToJson() { |
| 89 | Json::Value cookie; |
| 90 | cookie["name"] = this->name_; |
| 91 | cookie["value"] = this->value_; |
| 92 | cookie["secure"] = this->is_secure_; |
| 93 | cookie["httpOnly"] = this->is_httponly_; |
| 94 | if (this->domain_.size() > 0) { |
| 95 | cookie["domain"] = this->domain_; |
| 96 | } |
| 97 | if (this->path_.size() > 0) { |
| 98 | cookie["path"] = this->path_; |
| 99 | } |
| 100 | if (this->expiration_time_ > 0) { |
| 101 | cookie["expiry"] = this->expiration_time_; |
| 102 | } |
| 103 | return cookie; |
| 104 | } |
| 105 | |
| 106 | BrowserCookie BrowserCookie::Copy(void) const { |
| 107 | BrowserCookie destination_cookie; |
no test coverage detected