fix: cookies.get should be able to filter domain (#20471)

* fix: use GetAllCookies when url is empty

* test: get cookie without url
This commit is contained in:
Cheng Zhao 2019-10-09 15:57:40 +09:00 committed by GitHub
parent ebd55c1147
commit 5e11be6898
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 45 additions and 20 deletions

View file

@ -19,6 +19,10 @@ namespace base {
class DictionaryValue;
}
namespace mate {
class Dictionary;
}
namespace net {
class URLRequestContextGetter;
}
@ -42,7 +46,7 @@ class Cookies : public mate::TrackableObject<Cookies> {
Cookies(v8::Isolate* isolate, AtomBrowserContext* browser_context);
~Cookies() override;
v8::Local<v8::Promise> Get(const base::DictionaryValue& filter);
v8::Local<v8::Promise> Get(const mate::Dictionary& filter);
v8::Local<v8::Promise> Set(const base::DictionaryValue& details);
v8::Local<v8::Promise> Remove(const GURL& url, const std::string& name);
v8::Local<v8::Promise> FlushStore();