Index: chrome/browser/resources/options/manage_profile_overlay.js |
diff --git a/chrome/browser/resources/options/manage_profile_overlay.js b/chrome/browser/resources/options/manage_profile_overlay.js |
index 43e9d5280fbc0f6ee9d49bf8774a72a9a1600fe2..83e498024e560272983b8d512bf1cd5a43c84bec 100644 |
--- a/chrome/browser/resources/options/manage_profile_overlay.js |
+++ b/chrome/browser/resources/options/manage_profile_overlay.js |
@@ -595,9 +595,7 @@ cr.define('options', function() { |
loadTimeData.getString('disconnectManagedProfileText'); |
$('manage-profile-overlay-disconnect-managed').hidden = false; |
- // Because this dialog isn't useful when refreshing or as part of the |
- // history, don't create a history entry for it when showing. |
- PageManager.showPageByName('manageProfile', false); |
+ PageManager.showPageByName('signOut'); |
}, |
/** |
@@ -623,6 +621,30 @@ cr.define('options', function() { |
'showCreateDialog', |
]); |
Dan Beam
2016/07/14 00:28:36
/**
* @extends {ManageProfileOverlay}
* @constru
Moe
2016/07/14 15:08:47
Done.
|
+ function DisconnectAccountOverlay() { |
+ Page.call(this, 'signOut', |
+ loadTimeData.getString('disconnectAccountTabTitle'), |
+ 'manage-profile-overlay'); |
Dan Beam
2016/07/14 00:28:36
why are you using this name? shouldn't it be disc
Moe
2016/07/14 15:08:47
the third argument is the ID of the div which is t
|
+ }; |
Dan Beam
2016/07/14 00:28:36
}; -> }
Moe
2016/07/14 15:08:47
Done.
|
+ |
+ cr.addSingletonGetter(DisconnectAccountOverlay); |
+ |
+ DisconnectAccountOverlay.prototype = { |
+ // Inherit from ManageProfileOverlay. |
Dan Beam
2016/07/14 00:28:36
remove this comment
Moe
2016/07/14 15:08:47
Done.
|
+ __proto__: ManageProfileOverlay.prototype, |
+ |
+ /** @override */ |
+ canShowPage: function() { |
+ var syncData = loadTimeData.getValue('syncData'); |
+ return syncData.signedIn && !syncData.signoutAllowed; |
+ }, |
+ |
+ /** @override */ |
+ didShowPage: function() { |
+ chrome.send('showDisconnectManagedProfileDialog'); |
+ } |
+ }; |
+ |
function CreateProfileOverlay() { |
Page.call(this, 'createProfile', |
loadTimeData.getString('createProfileTabTitle'), |
@@ -883,6 +905,7 @@ cr.define('options', function() { |
// Export |
return { |
ManageProfileOverlay: ManageProfileOverlay, |
+ DisconnectAccountOverlay: DisconnectAccountOverlay, |
CreateProfileOverlay: CreateProfileOverlay, |
}; |
}); |