1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_COOKIE_MONSTER_DELEGATE_H_
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_COOKIE_MONSTER_DELEGATE_H_
8 #include "base/callback.h"
9 #include "base/macros.h"
10 #include "net/cookies/cookie_monster.h"
14 // Sends cookie-change notifications from the UI thread via
15 // chrome::NOTIFICATION_COOKIE_CHANGED_FOR_EXTENSIONS.
16 class ExtensionCookieMonsterDelegate
: public net::CookieMonsterDelegate
{
18 explicit ExtensionCookieMonsterDelegate(Profile
* profile
);
20 // net::CookieMonster::Delegate implementation.
22 const net::CanonicalCookie
& cookie
,
24 net::CookieMonster::Delegate::ChangeCause cause
) override
;
27 ~ExtensionCookieMonsterDelegate() override
;
29 void OnCookieChangedAsyncHelper(
30 const net::CanonicalCookie
& cookie
,
32 net::CookieMonster::Delegate::ChangeCause cause
);
34 const base::Callback
<Profile
*(void)> profile_getter_
;
36 DISALLOW_COPY_AND_ASSIGN(ExtensionCookieMonsterDelegate
);
39 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_COOKIE_MONSTER_DELEGATE_H_