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

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: format 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 8df8973d7b22dac9e45f4cd467e8b5d53614a5c9..be5ba0d795b624850a211ef4c675816b0eae78fb 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,
@@ -108,13 +114,29 @@ Polymer({
* Decide whether or not should display no synced tabs message.
* @param {boolean} signInState
* @param {number} syncedDevicesLength
+ * @param {boolean} guestSession
* @return {boolean}
*/
- showNoSyncedMessage: function(signInState, syncedDevicesLength) {
+ showNoSyncedMessage: function(
+ signInState, syncedDevicesLength, guestSession) {
+ if (guestSession)
+ return true;
+
return signInState && syncedDevicesLength == 0;
},
/**
+ * Shows the signin guide when the user is not signed in and not in a guest
+ * session.
+ * @param {boolean} signInState
+ * @param {boolean} guestSession
+ * @return {boolean}
+ */
+ showSignInGuide: function(signInState, guestSession) {
+ return !signInState && !guestSession;
+ },
+
+ /**
* Decide what message should be displayed when user is logged in and there
* are no synced tabs.
* @param {boolean} fetchingSyncedTabs
« no previous file with comments | « chrome/browser/resources/md_history/synced_device_manager.html ('k') | chrome/browser/ui/webui/md_history_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698