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

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

Issue 2238163002: [MD History] Add UMA stats for switching views and the CBD button. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@start_focus_in_search_bar
Patch Set: fix_test Created 4 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/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 2a73361fdef0d90c39705c9da4586965852e6da6..4d9a6fe102b50a60b23267bc85bc9dcbe4fbbb5a 100644
--- a/chrome/browser/resources/md_history/synced_device_manager.js
+++ b/chrome/browser/resources/md_history/synced_device_manager.js
@@ -40,9 +40,9 @@ Polymer({
},
/** @private */
- signInState_: {
+ signInState: {
type: Boolean,
- value: loadTimeData.getBoolean('isUserSignedIn'),
+ observer: 'signInStateChanged_',
},
/** @private */
@@ -243,18 +243,12 @@ Polymer({
* Get called when user's sign in state changes, this will affect UI of synced
* tabs page. Sign in promo gets displayed when user is signed out, and
* different messages are shown when there are no synced tabs.
- * @param {boolean} isUserSignedIn
*/
- updateSignInState: function(isUserSignedIn) {
- // If user's sign in state didn't change, then don't change message or
- // update UI.
- if (this.signInState_ == isUserSignedIn)
- return;
-
- this.signInState_ = isUserSignedIn;
+ signInStateChanged_: function() {
+ this.fire('history-view-changed');
// User signed out, clear synced device list and show the sign in promo.
- if (!isUserSignedIn) {
+ if (!this.signInState) {
this.clearDisplayedSyncedDevices_();
return;
}

Powered by Google App Engine
This is Rietveld 408576698