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

Unified Diff: net/cookies/cookie_store.h

Issue 1701063002: CookieStore: Remove reference counting. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@threadsafe
Patch Set: merge Created 4 years, 9 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 | « net/cookies/cookie_monster_unittest.cc ('k') | net/cookies/cookie_store.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/cookies/cookie_store.h
diff --git a/net/cookies/cookie_store.h b/net/cookies/cookie_store.h
index f7805b9e6dce1dd544d36e4d2af27f9eb2995a42..64852612d53fc2f544c344b4b0d88467c8acbdd5 100644
--- a/net/cookies/cookie_store.h
+++ b/net/cookies/cookie_store.h
@@ -12,7 +12,7 @@
#include "base/callback.h"
#include "base/callback_list.h"
-#include "base/memory/ref_counted.h"
+#include "base/memory/scoped_ptr.h"
#include "base/time/time.h"
#include "net/base/net_export.h"
#include "net/cookies/canonical_cookie.h"
@@ -31,7 +31,7 @@ class CookieMonster;
// All async functions may either invoke the callback asynchronously, or they
// may be invoked immediately (prior to return of the asynchronous function).
// Destroying the CookieStore will cancel pending async callbacks.
-class NET_EXPORT CookieStore : public base::RefCountedThreadSafe<CookieStore> {
+class NET_EXPORT CookieStore {
public:
// Callback definitions.
typedef base::Callback<void(const CookieList& cookies)> GetCookieListCallback;
@@ -44,6 +44,8 @@ class NET_EXPORT CookieStore : public base::RefCountedThreadSafe<CookieStore> {
CookieChangedCallbackList;
typedef CookieChangedCallbackList::Subscription CookieChangedSubscription;
+ virtual ~CookieStore();
+
// Returns the cookie line (e.g. "cookie1=value1; cookie2=value2") represented
// by |cookies|. The string is built in the same order as the given list.
//
@@ -201,9 +203,7 @@ class NET_EXPORT CookieStore : public base::RefCountedThreadSafe<CookieStore> {
const CookieChangedCallback& callback) = 0;
protected:
- friend class base::RefCountedThreadSafe<CookieStore>;
CookieStore();
- virtual ~CookieStore();
};
} // namespace net
« no previous file with comments | « net/cookies/cookie_monster_unittest.cc ('k') | net/cookies/cookie_store.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698