Chromium Code Reviews| 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'); |