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

Unified Diff: net/cookies/cookie_monster.h

Issue 12546016: Remove the Extensions URLRequestContext (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: most unittests pass Created 7 years, 5 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
Index: net/cookies/cookie_monster.h
diff --git a/net/cookies/cookie_monster.h b/net/cookies/cookie_monster.h
index d248f1007eef6fa1339b354abed549f5612712fb..269c67ace25697638ca090e6a126f712c722fa7d 100644
--- a/net/cookies/cookie_monster.h
+++ b/net/cookies/cookie_monster.h
@@ -37,6 +37,7 @@ class TimeTicks;
namespace net {
+class CookieMonsterDelegate;
class ParsedCookie;
// The cookie monster is the system for storing and retrieving cookies. It has
@@ -65,8 +66,8 @@ class ParsedCookie;
// - Verify that our domain enforcement and non-dotted handling is correct
class NET_EXPORT CookieMonster : public CookieStore {
public:
- class Delegate;
class PersistentCookieStore;
+ typedef CookieMonsterDelegate Delegate;
// Terminology:
// * The 'top level domain' (TLD) of an internet domain name is
@@ -138,11 +139,11 @@ class NET_EXPORT CookieMonster : public CookieStore {
// monster's existence. If |store| is NULL, then no backing store will be
// updated. If |delegate| is non-NULL, it will be notified on
// creation/deletion of cookies.
- CookieMonster(PersistentCookieStore* store, Delegate* delegate);
+ CookieMonster(PersistentCookieStore* store, CookieMonsterDelegate* delegate);
// Only used during unit testing.
CookieMonster(PersistentCookieStore* store,
- Delegate* delegate,
+ CookieMonsterDelegate* delegate,
int last_access_threshold_milliseconds);
// Helper function that adds all cookies from |list| into this instance.
@@ -340,8 +341,8 @@ class NET_EXPORT CookieMonster : public CookieStore {
// and to provide a public cause for onCookieChange notifications.
//
// If you add or remove causes from this list, please be sure to also update
- // the Delegate::ChangeCause mapping inside ChangeCauseMapping. Moreover,
- // these are used as array indexes, so avoid reordering to keep the
+ // the CookieMonsterDelegate::ChangeCause mapping inside ChangeCauseMapping.
+ // Moreover, these are used as array indexes, so avoid reordering to keep the
// histogram buckets consistent. New items (if necessary) should be added
// at the end of the list, just before DELETE_COOKIE_LAST_ENTRY.
enum DeletionCause {
@@ -525,7 +526,8 @@ class NET_EXPORT CookieMonster : public CookieStore {
const base::Time& current_time);
// |deletion_cause| argument is used for collecting statistics and choosing
- // the correct Delegate::ChangeCause for OnCookieChanged notifications.
+ // the correct CookieMonsterDelegate::ChangeCause for OnCookieChanged
+ // notifications.
void InternalDeleteCookie(CookieMap::iterator it, bool sync_to_store,
DeletionCause deletion_cause);
@@ -647,7 +649,7 @@ class NET_EXPORT CookieMonster : public CookieStore {
std::vector<std::string> cookieable_schemes_;
- scoped_refptr<Delegate> delegate_;
+ scoped_refptr<CookieMonsterDelegate> delegate_;
// Lock for thread-safety
base::Lock lock_;
@@ -666,8 +668,8 @@ class NET_EXPORT CookieMonster : public CookieStore {
DISALLOW_COPY_AND_ASSIGN(CookieMonster);
};
-class NET_EXPORT CookieMonster::Delegate
- : public base::RefCountedThreadSafe<CookieMonster::Delegate> {
+class NET_EXPORT CookieMonsterDelegate
+ : public base::RefCountedThreadSafe<CookieMonsterDelegate> {
public:
// The publicly relevant reasons a cookie might be changed.
enum ChangeCause {
@@ -699,8 +701,8 @@ class NET_EXPORT CookieMonster::Delegate
bool removed,
ChangeCause cause) = 0;
protected:
- friend class base::RefCountedThreadSafe<CookieMonster::Delegate>;
- virtual ~Delegate() {}
+ friend class base::RefCountedThreadSafe<CookieMonsterDelegate>;
+ virtual ~CookieMonsterDelegate() {}
};
typedef base::RefCountedThreadSafe<CookieMonster::PersistentCookieStore>

Powered by Google App Engine
This is Rietveld 408576698