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

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: 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: 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..4f3080442e19ac82889d8993b1cd61e758271514 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'
]
};
@@ -165,10 +166,13 @@ chrome.signin.internalsInfo = {};
// Replace the displayed values with the latest fetched ones.
function refreshSigninInfo(signinInfo) {
chrome.signin.internalsInfo = signinInfo;
- var internalsInfoDiv = $('signin-info');
- jstProcess(new JsEvalContext(signinInfo), internalsInfoDiv);
- var tokenInfoDiv = $('token-info');
- jstProcess(new JsEvalContext(signinInfo), tokenInfoDiv);
+ jstProcess(new JsEvalContext(signinInfo), $('signin-info'));
+ jstProcess(new JsEvalContext(signinInfo), $('token-info'));
+}
+
+// Replace the cookie information with the fetched values.
+function updateCookieAccounts(cookieAccountsInfo) {
+ jstProcess(new JsEvalContext(cookieAccountsInfo), $('cookie-info'));
}
// On load, do an initial refresh and register refreshSigninInfo to be invoked
@@ -176,9 +180,8 @@ function refreshSigninInfo(signinInfo) {
function onLoad() {
chrome.signin.getSigninInfo(refreshSigninInfo);
- chrome.signin.onSigninInfoChanged.addListener(function(info) {
- refreshSigninInfo(info);
- });
+ chrome.signin.onSigninInfoChanged.addListener(refreshSigninInfo);
+ chrome.signin.onCookieAccountsFetched.addListener(updateCookieAccounts);
}
document.addEventListener('DOMContentLoaded', onLoad, false);
« no previous file with comments | « chrome/browser/resources/signin_internals/signin_index.html ('k') | chrome/browser/signin/chrome_signin_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698