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

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

Issue 421583002: Show GAIA/cookie accounts on the signin-internals page. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: include for CrOS Created 6 years, 4 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: 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 8668ab629781d5af3ce3d60fdb5d7bcadd0cfe5f..200c2dcff4bcbd76f3051a13165c2fdc2faa7a71 100644
--- a/components/signin/core/browser/signin_client.h
+++ b/components/signin/core/browser/signin_client.h
@@ -6,6 +6,7 @@
#define COMPONENTS_SIGNIN_CORE_BROWSER_SIGNIN_CLIENT_H_
#include "base/callback.h"
+#include "base/callback_list.h"
#include "components/keyed_service/core/keyed_service.h"
#include "components/signin/core/browser/webdata/token_web_data.h"
@@ -33,6 +34,9 @@ class SigninClient : public KeyedService {
typedef base::Callback<void(const net::CanonicalCookie* cookie)>
CookieChangedCallback;
+ typedef base::CallbackList<void(const net::CanonicalCookie* cookie)>
+ CookieChangedCallbackList;
+
virtual ~SigninClient() {}
// Gets the preferences associated with the client.
@@ -65,13 +69,12 @@ class SigninClient : public KeyedService {
// Signin component is being used.
virtual std::string GetProductVersion() = 0;
- // Sets the callback that should be called when a cookie changes. The
- // callback will be called only if it is not empty.
+ // 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 void SetCookieChangedCallback(
- const CookieChangedCallback& callback) = 0;
+ virtual scoped_ptr<CookieChangedCallbackList::Subscription>
+ AddCookieChangedCallback(const CookieChangedCallback& callback) = 0;
// Called when Google signin has succeeded.
virtual void GoogleSigninSucceeded(const std::string& username,
« 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