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

Unified Diff: components/signin/core/browser/signin_client.h

Issue 695553002: Account reconcilor: Use cookie store cookie changed subscription. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Nits Created 6 years, 1 month 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: components/signin/core/browser/signin_client.h
diff --git a/components/signin/core/browser/signin_client.h b/components/signin/core/browser/signin_client.h
index 7a48a0b284839e77f68f3234c2b57d272acaf5fa..282b31ca25458e6b24d901e4d6a144e25c674ad9 100644
--- a/components/signin/core/browser/signin_client.h
+++ b/components/signin/core/browser/signin_client.h
@@ -10,13 +10,14 @@
#include "base/time/time.h"
#include "components/keyed_service/core/keyed_service.h"
#include "components/signin/core/browser/webdata/token_web_data.h"
+#include "net/cookies/cookie_store.h"
+#include "url/gurl.h"
class PrefService;
class SigninManagerBase;
class TokenWebData;
namespace net {
-class CanonicalCookie;
class URLRequestContextGetter;
}
@@ -32,11 +33,11 @@ class ProfileOAuth2TokenServiceIOSProvider;
// embedder.
class SigninClient : public KeyedService {
public:
- typedef base::Callback<void(const net::CanonicalCookie* cookie)>
- CookieChangedCallback;
-
- typedef base::CallbackList<void(const net::CanonicalCookie* cookie)>
- CookieChangedCallbackList;
+ // The subcription for cookie changed notifications.
+ class CookieChangedSubscription {
+ public:
+ virtual ~CookieChangedSubscription() {};
+ };
~SigninClient() override {}
@@ -70,12 +71,14 @@ class SigninClient : public KeyedService {
// Signin component is being used.
virtual std::string GetProductVersion() = 0;
- // Adds or removes a callback that should be called when a cookie changes.
- // TODO(blundell): Eliminate this interface in favor of having core signin
- // code observe cookie changes once //chrome/browser/net has been
- // componentized.
- virtual scoped_ptr<CookieChangedCallbackList::Subscription>
- AddCookieChangedCallback(const CookieChangedCallback& callback) = 0;
+ // Adds a callback to be called each time a cookie for |url| with name |name|
+ // changes.
+ // Note that |callback| will always be called on the thread that
+ // |AddCookieChangedCallback| was called on.
+ virtual scoped_ptr<CookieChangedSubscription> AddCookieChangedCallback(
+ const GURL& url,
+ const std::string& name,
+ const net::CookieStore::CookieChangedCallback& callback) = 0;
// Called when Google signin has succeeded.
virtual void GoogleSigninSucceeded(const std::string& account_id,
« no previous file with comments | « components/signin/core/browser/account_reconcilor.cc ('k') | components/signin/core/browser/test_signin_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698