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

Unified Diff: chrome/browser/resources/signin_internals/signin_internals.js

Issue 421583002: Show GAIA/cookie accounts on the signin-internals page. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: unit tests fix up 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: chrome/browser/resources/signin_internals/signin_internals.js
diff --git a/chrome/browser/resources/signin_internals/signin_internals.js b/chrome/browser/resources/signin_internals/signin_internals.js
index 17555f21c9c51f1867aaacd41fceb3efec37fd60..2d176e81ead047421de53e139c7de47d5c378fbc 100644
--- a/chrome/browser/resources/signin_internals/signin_internals.js
+++ b/chrome/browser/resources/signin_internals/signin_internals.js
@@ -112,7 +112,8 @@ Event.prototype.fire = function() {
// These are the events that will be registered.
chrome.signin.events = {
'signin_manager': [
- 'onSigninInfoChanged'
+ 'onSigninInfoChanged',
+ 'onCookieAccountsFetched'
]
};
@@ -171,6 +172,12 @@ function refreshSigninInfo(signinInfo) {
jstProcess(new JsEvalContext(signinInfo), tokenInfoDiv);
}
+// Replace the cookie information with the fetched values.
+function updateCookieAccounts(cookieAccountsInfo) {
+ var cookieInfoDiv = $('cookie-info');
Evan Stade 2014/08/08 19:33:54 nit: inline
Mike Lerman 2014/08/08 20:02:04 Done.
+ jstProcess(new JsEvalContext(cookieAccountsInfo), cookieInfoDiv);
+}
+
// On load, do an initial refresh and register refreshSigninInfo to be invoked
// whenever we get new signin information from SigninInternalsUI.
function onLoad() {
@@ -179,6 +186,9 @@ function onLoad() {
chrome.signin.onSigninInfoChanged.addListener(function(info) {
refreshSigninInfo(info);
});
+ chrome.signin.onCookieAccountsFetched.addListener(function(info) {
Evan Stade 2014/08/08 19:33:54 why not: chrome.signin.onCookieAccountsFetched.add
Mike Lerman 2014/08/08 20:02:04 Done.
+ updateCookieAccounts(info);
+ });
}
document.addEventListener('DOMContentLoaded', onLoad, false);

Powered by Google App Engine
This is Rietveld 408576698