Namespace of ChangeCause has changed
This commit is contained in:
parent
d4e3dade39
commit
231173aa90
4 changed files with 18 additions and 14 deletions
|
@ -56,19 +56,19 @@ struct Converter<net::CanonicalCookie> {
|
|||
};
|
||||
|
||||
template<>
|
||||
struct Converter<AtomCookieDelegate::ChangeCause> {
|
||||
struct Converter<net::CookieStore::ChangeCause> {
|
||||
static v8::Local<v8::Value> ToV8(v8::Isolate* isolate,
|
||||
const AtomCookieDelegate::ChangeCause& val) {
|
||||
const net::CookieStore::ChangeCause& val) {
|
||||
switch (val) {
|
||||
case AtomCookieDelegate::ChangeCause::CHANGE_COOKIE_EXPLICIT:
|
||||
case net::CookieStore::ChangeCause::EXPLICIT:
|
||||
return mate::StringToV8(isolate, "explicit");
|
||||
case AtomCookieDelegate::ChangeCause::CHANGE_COOKIE_OVERWRITE:
|
||||
case net::CookieStore::ChangeCause::OVERWRITE:
|
||||
return mate::StringToV8(isolate, "overwrite");
|
||||
case AtomCookieDelegate::ChangeCause::CHANGE_COOKIE_EXPIRED:
|
||||
case net::CookieStore::ChangeCause::EXPIRED:
|
||||
return mate::StringToV8(isolate, "expired");
|
||||
case AtomCookieDelegate::ChangeCause::CHANGE_COOKIE_EVICTED:
|
||||
case net::CookieStore::ChangeCause::EVICTED:
|
||||
return mate::StringToV8(isolate, "evicted");
|
||||
case AtomCookieDelegate::ChangeCause::CHANGE_COOKIE_EXPIRED_OVERWRITE:
|
||||
case net::CookieStore::ChangeCause::EXPIRED_OVERWRITE:
|
||||
return mate::StringToV8(isolate, "expired-overwrite");
|
||||
default:
|
||||
return mate::StringToV8(isolate, "unknown");
|
||||
|
@ -266,7 +266,7 @@ void Cookies::Set(const base::DictionaryValue& details,
|
|||
|
||||
void Cookies::OnCookieChanged(const net::CanonicalCookie& cookie,
|
||||
bool removed,
|
||||
AtomCookieDelegate::ChangeCause cause) {
|
||||
net::CookieStore::ChangeCause cause) {
|
||||
Emit("changed", cookie, cause, removed);
|
||||
}
|
||||
|
||||
|
|
|
@ -57,7 +57,7 @@ class Cookies : public mate::TrackableObject<Cookies>,
|
|||
// AtomCookieDelegate::Observer:
|
||||
void OnCookieChanged(const net::CanonicalCookie& cookie,
|
||||
bool removed,
|
||||
AtomCookieDelegate::ChangeCause cause) override;
|
||||
net::CookieStore::ChangeCause cause) override;
|
||||
|
||||
private:
|
||||
net::URLRequestContextGetter* request_context_getter_;
|
||||
|
|
|
@ -23,14 +23,18 @@ void AtomCookieDelegate::RemoveObserver(Observer* observer) {
|
|||
}
|
||||
|
||||
void AtomCookieDelegate::NotifyObservers(
|
||||
const net::CanonicalCookie& cookie, bool removed, ChangeCause cause) {
|
||||
const net::CanonicalCookie& cookie,
|
||||
bool removed,
|
||||
net::CookieStore::ChangeCause cause) {
|
||||
FOR_EACH_OBSERVER(Observer,
|
||||
observers_,
|
||||
OnCookieChanged(cookie, removed, cause));
|
||||
}
|
||||
|
||||
void AtomCookieDelegate::OnCookieChanged(
|
||||
const net::CanonicalCookie& cookie, bool removed, ChangeCause cause) {
|
||||
const net::CanonicalCookie& cookie,
|
||||
bool removed,
|
||||
net::CookieStore::ChangeCause cause) {
|
||||
content::BrowserThread::PostTask(
|
||||
content::BrowserThread::UI,
|
||||
FROM_HERE,
|
||||
|
|
|
@ -19,7 +19,7 @@ class AtomCookieDelegate : public net::CookieMonsterDelegate {
|
|||
public:
|
||||
virtual void OnCookieChanged(const net::CanonicalCookie& cookie,
|
||||
bool removed,
|
||||
ChangeCause cause) {}
|
||||
net::CookieStore::ChangeCause cause) {}
|
||||
protected:
|
||||
virtual ~Observer() {}
|
||||
};
|
||||
|
@ -30,7 +30,7 @@ class AtomCookieDelegate : public net::CookieMonsterDelegate {
|
|||
// net::CookieMonsterDelegate:
|
||||
void OnCookieChanged(const net::CanonicalCookie& cookie,
|
||||
bool removed,
|
||||
ChangeCause cause) override;
|
||||
net::CookieStore::ChangeCause cause) override;
|
||||
|
||||
|
||||
private:
|
||||
|
@ -38,7 +38,7 @@ class AtomCookieDelegate : public net::CookieMonsterDelegate {
|
|||
|
||||
void NotifyObservers(const net::CanonicalCookie& cookie,
|
||||
bool removed,
|
||||
ChangeCause cause);
|
||||
net::CookieStore::ChangeCause cause);
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(AtomCookieDelegate);
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue