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

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: add test, add grouped history 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 d329273b540af8784d9b8d819777055b41e6feff..517c913d7399e357c2a04ea246a5e311934ca8cd 100644
--- a/chrome/browser/resources/md_history/synced_device_manager.js
+++ b/chrome/browser/resources/md_history/synced_device_manager.js
@@ -39,9 +39,11 @@ Polymer({
},
/** @private */
- signInState_: {
+ signInState: {
type: Boolean,
+ // Updated on attach by chrome.sending 'otherDevicesInitialized'.
value: loadTimeData.getBoolean('isUserSignedIn'),
+ observer: 'signInStateChanged_',
},
/** @private */
@@ -218,18 +220,13 @@ 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
+ * @param {boolean} signInState
*/
- 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(signInState) {
+ this.fire('history-view-changed');
// User signed out, clear synced device list and show the sign in promo.
- if (!isUserSignedIn) {
+ if (!signInState) {
this.clearDisplayedSyncedDevices_();
return;
}

Powered by Google App Engine
This is Rietveld 408576698