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

Unified Diff: chrome/browser/resources/md_history/synced_device_manager.js

Issue 2191173003: MD History: Get sign in state from backend when refreshing the page (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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/md_history/synced_device_manager.js
diff --git a/chrome/browser/resources/md_history/synced_device_manager.js b/chrome/browser/resources/md_history/synced_device_manager.js
index 2a776551cb17ab22270d755a8f8581c6a89edaaa..63946e1c7730b90e5761f0935d0dd71252b485f2 100644
--- a/chrome/browser/resources/md_history/synced_device_manager.js
+++ b/chrome/browser/resources/md_history/synced_device_manager.js
@@ -41,7 +41,7 @@ Polymer({
/** @private */
signInState_: {
type: Boolean,
- value: loadTimeData.getBoolean('isUserSignedIn'),
+ value: true,
calamity 2016/07/29 05:14:59 You might want to leave this in... I think this wi
lshang 2016/07/29 06:11:58 Done.
},
/** @private */
@@ -57,6 +57,15 @@ Polymer({
}
},
+ /** @override */
+ attached: function() {
+ // When user signs in or out with MD History tab open, the internal sign in
+ // state will be updated, but refreshing the page will still get the
+ // outdated state. Get the current state from backend when element is
+ // attached.
+ this.getSignInState_();
calamity 2016/07/29 05:14:59 No need for a method here, just chrome.send('other
lshang 2016/07/29 06:11:58 Done.
+ },
+
/**
* @param {!ForeignSession} session
* @return {!ForeignDeviceInternal}
@@ -103,6 +112,10 @@ Polymer({
};
},
+ /** @private */
+ getSignInState_: function() {
+ chrome.send('getSignInState');
+ },
onSignInTap_: function() {
chrome.send('SyncSetupShowSetupUI');
« no previous file with comments | « no previous file | chrome/browser/ui/webui/history_login_handler.h » ('j') | chrome/browser/ui/webui/history_login_handler.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698