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

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

Issue 2171513004: MD History: Hide sign in guide in guest mode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add test 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 5a47f0a9c2deccb0e168d83aaddc0fa31cf71689..94276c8aab7d7956bba9e2e7295ca7a7225da03f 100644
--- a/chrome/browser/resources/md_history/synced_device_manager.js
+++ b/chrome/browser/resources/md_history/synced_device_manager.js
@@ -45,6 +45,12 @@ Polymer({
},
/** @private */
+ guestSession_: {
+ type: Boolean,
+ value: loadTimeData.getBoolean('isGuestSession'),
+ },
+
+ /** @private */
fetchingSyncedTabs_: {
type: Boolean,
value: false,
@@ -111,10 +117,21 @@ Polymer({
* @return {boolean}
*/
showNoSyncedMessage: function(signInState, syncedDevicesLength) {
+ if (this.guestSession_)
+ return true;
calamity 2016/07/21 04:56:49 nit: Newline after early return.
lshang 2016/07/21 07:09:55 Done.
return signInState && syncedDevicesLength == 0;
},
/**
+ * Decide whether or not should hide sign in guide.
calamity 2016/07/21 04:56:49 * Hides the signin guide when the user is already
lshang 2016/07/21 07:09:55 Done.
+ * @param {boolean} signInState
+ * @return {boolean}
+ */
+ hideSignInGuide: function(signInState) {
calamity 2016/07/21 04:56:49 Maybe make this 'showSignInGuide' and invert every
lshang 2016/07/21 07:09:55 Done. Yeah I was also thinking of this, this is pr
+ return signInState || this.guestSession_;
+ },
+
+ /**
* Decide what message should be displayed when user is logged in and there
* are no synced tabs.
* @param {boolean} fetchingSyncedTabs

Powered by Google App Engine
This is Rietveld 408576698