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

Side by Side Diff: chrome/browser/resources/signin_internals/signin_internals.js

Issue 1058513002: Add an Accounts in Token Service section to about:signin-internals. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase before submit Created 5 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 var chrome = chrome || {}; 5 var chrome = chrome || {};
6 6
7 /** 7 /**
8 * Organizes all signin event listeners and asynchronous requests. 8 * Organizes all signin event listeners and asynchronous requests.
9 * This object has no public constructor. 9 * This object has no public constructor.
10 * @type {Object} 10 * @type {Object}
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 chrome.signin[signinFunction] = makeSigninFunction(signinFunction); 161 chrome.signin[signinFunction] = makeSigninFunction(signinFunction);
162 } 162 }
163 163
164 chrome.signin.internalsInfo = {}; 164 chrome.signin.internalsInfo = {};
165 165
166 // Replace the displayed values with the latest fetched ones. 166 // Replace the displayed values with the latest fetched ones.
167 function refreshSigninInfo(signinInfo) { 167 function refreshSigninInfo(signinInfo) {
168 chrome.signin.internalsInfo = signinInfo; 168 chrome.signin.internalsInfo = signinInfo;
169 jstProcess(new JsEvalContext(signinInfo), $('signin-info')); 169 jstProcess(new JsEvalContext(signinInfo), $('signin-info'));
170 jstProcess(new JsEvalContext(signinInfo), $('token-info')); 170 jstProcess(new JsEvalContext(signinInfo), $('token-info'));
171 jstProcess(new JsEvalContext(signinInfo), $('account-info'));
171 } 172 }
172 173
173 // Replace the cookie information with the fetched values. 174 // Replace the cookie information with the fetched values.
174 function updateCookieAccounts(cookieAccountsInfo) { 175 function updateCookieAccounts(cookieAccountsInfo) {
175 jstProcess(new JsEvalContext(cookieAccountsInfo), $('cookie-info')); 176 jstProcess(new JsEvalContext(cookieAccountsInfo), $('cookie-info'));
176 } 177 }
177 178
178 // On load, do an initial refresh and register refreshSigninInfo to be invoked 179 // On load, do an initial refresh and register refreshSigninInfo to be invoked
179 // whenever we get new signin information from SigninInternalsUI. 180 // whenever we get new signin information from SigninInternalsUI.
180 function onLoad() { 181 function onLoad() {
181 chrome.signin.getSigninInfo(refreshSigninInfo); 182 chrome.signin.getSigninInfo(refreshSigninInfo);
182 183
183 chrome.signin.onSigninInfoChanged.addListener(refreshSigninInfo); 184 chrome.signin.onSigninInfoChanged.addListener(refreshSigninInfo);
184 chrome.signin.onCookieAccountsFetched.addListener(updateCookieAccounts); 185 chrome.signin.onCookieAccountsFetched.addListener(updateCookieAccounts);
185 } 186 }
186 187
187 document.addEventListener('DOMContentLoaded', onLoad, false); 188 document.addEventListener('DOMContentLoaded', onLoad, false);
188 })(); 189 })();
OLDNEW
« no previous file with comments | « chrome/browser/resources/signin_internals/signin_index.html ('k') | components/signin/core/browser/about_signin_internals.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698