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

Unified Diff: chrome/browser/resources/history/other_devices.js

Issue 1143963002: Split NTPLoginHandler across chrome://apps and chrome://history. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: lower Created 5 years, 7 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/history/other_devices.js
diff --git a/chrome/browser/resources/history/other_devices.js b/chrome/browser/resources/history/other_devices.js
index 3f29ca7ca46353f2863bde8cc9ac3e66a1931e48..270f75623a7a767361e1facd05f137eca3b47ca3 100644
--- a/chrome/browser/resources/history/other_devices.js
+++ b/chrome/browser/resources/history/other_devices.js
@@ -535,15 +535,10 @@ function setForeignSessions(sessionList, isTabSyncEnabled) {
}
/**
- * Called when this element is initialized, and from the new tab page when
- * the user's signed in state changes,
- * @param {string} header The first line of text (unused here).
- * @param {string} subHeader The second line of text (unused here).
- * @param {string} iconURL The url for the login status icon. If this is null
- then the login status icon is hidden (unused here).
+ * Called when initialized or the user's signed in state changes,
* @param {boolean} isUserSignedIn Is the user currently signed in?
*/
-function updateLogin(header, subHeader, iconURL, isUserSignedIn) {
+function updateSignInState(isUserSignedIn) {
if (devicesView)
devicesView.updateSignInState(isUserSignedIn);
}
@@ -557,15 +552,6 @@ function load() {
if (!loadTimeData.getBoolean('isInstantExtendedApiEnabled'))
return;
- // We must use this namespace to reuse the handler code for foreign session
- // and login. TODO(estade): change the call site in ntp_login_handler.cc so
- // this hack isn't necessary.
- cr.define('ntp', function() {
- return {
- updateLogin: updateLogin
- };
- });
-
devicesView = new DevicesView();
// Create the context menu that appears when the user right clicks
@@ -577,6 +563,8 @@ function load() {
};
$('search-field').addEventListener('search', doSearch);
$('search-button').addEventListener('click', doSearch);
+
+ chrome.send('otherDevicesInitialized');
}
// Add handlers to HTML elements.

Powered by Google App Engine
This is Rietveld 408576698