Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(491)

Unified Diff: net/cookies/cookie_monster.h

Issue 2874973002: Flush Channel IDs when Cookies get saved to a persistent backend (Closed)
Patch Set: Initialize channel_id_service to nullptr Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/public/browser/cookie_store_factory.h ('k') | net/cookies/cookie_monster.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/cookies/cookie_monster.h
diff --git a/net/cookies/cookie_monster.h b/net/cookies/cookie_monster.h
index ff7c47f8b0a419348981c886ed2da9414d46ad0e..1ddbccc16270d77c15132f5c3703d56cc2f564bb 100644
--- a/net/cookies/cookie_monster.h
+++ b/net/cookies/cookie_monster.h
@@ -38,6 +38,7 @@ class HistogramBase;
namespace net {
+class ChannelIDService;
class CookieMonsterDelegate;
// The cookie monster is the system for storing and retrieving cookies. It has
@@ -134,6 +135,13 @@ class NET_EXPORT CookieMonster : public CookieStore {
// creation/deletion of cookies.
CookieMonster(PersistentCookieStore* store, CookieMonsterDelegate* delegate);
+ // Like above, but includes a non-owning pointer |channel_id_service| for the
+ // corresponding ChannelIDService used with this CookieStore. The
+ // |channel_id_service| must outlive the CookieMonster.
+ CookieMonster(PersistentCookieStore* store,
+ CookieMonsterDelegate* delegate,
+ ChannelIDService* channel_id_service);
+
// Only used during unit testing.
CookieMonster(PersistentCookieStore* store,
CookieMonsterDelegate* delegate,
@@ -217,6 +225,11 @@ class NET_EXPORT CookieMonster : public CookieStore {
bool IsEphemeral() override;
private:
+ CookieMonster(PersistentCookieStore* store,
+ CookieMonsterDelegate* delegate,
+ ChannelIDService* channel_id_service,
+ base::TimeDelta last_access_threshold);
+
// For queueing the cookie monster calls.
class CookieMonsterTask;
template <typename Result>
@@ -716,6 +729,7 @@ class NET_EXPORT CookieMonster : public CookieStore {
std::vector<std::string> cookieable_schemes_;
scoped_refptr<CookieMonsterDelegate> delegate_;
+ ChannelIDService* channel_id_service_;
base::Time last_statistic_record_time_;
« no previous file with comments | « content/public/browser/cookie_store_factory.h ('k') | net/cookies/cookie_monster.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698