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

Unified Diff: chrome/browser/resources/options/manage_profile_overlay.js

Issue 2136103008: Makes 'Disconnect Account' overlay in chrome://settings accessible thru a URL (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments 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
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/browser/resources/options/options.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..298b4e2a0393502236ebf0a9dead4ac61d3142de 100644
--- a/chrome/browser/resources/options/manage_profile_overlay.js
+++ b/chrome/browser/resources/options/manage_profile_overlay.js
@@ -17,7 +17,7 @@ cr.define('options', function() {
Page.call(this, 'manageProfile',
loadTimeData.getString('manageProfileTabTitle'),
'manage-profile-overlay');
- };
+ }
cr.addSingletonGetter(ManageProfileOverlay);
@@ -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,16 +621,46 @@ cr.define('options', function() {
'showCreateDialog',
]);
+ /**
+ * @constructor
+ * @extends {options.ManageProfileOverlay}
+ */
+ function DisconnectAccountOverlay() {
+ Page.call(this, 'signOut',
+ loadTimeData.getString('disconnectAccountTabTitle'),
+ 'manage-profile-overlay');
+ }
+
+ cr.addSingletonGetter(DisconnectAccountOverlay);
+
+ DisconnectAccountOverlay.prototype = {
+ __proto__: ManageProfileOverlay.prototype,
+
+ /** @override */
+ canShowPage: function() {
+ var syncData = loadTimeData.getValue('syncData');
+ return syncData.signedIn && !syncData.signoutAllowed;
+ },
+
+ /** @override */
+ didShowPage: function() {
+ chrome.send('showDisconnectManagedProfileDialog');
+ }
+ };
+
+ /**
+ * @constructor
+ * @extends {options.ManageProfileOverlay}
+ */
function CreateProfileOverlay() {
Page.call(this, 'createProfile',
loadTimeData.getString('createProfileTabTitle'),
'manage-profile-overlay');
- };
+ }
cr.addSingletonGetter(CreateProfileOverlay);
CreateProfileOverlay.prototype = {
- // Inherit from ManageProfileOverlay.
__proto__: ManageProfileOverlay.prototype,
// The signed-in email address of the current profile, or empty if they're
@@ -883,6 +911,7 @@ cr.define('options', function() {
// Export
return {
ManageProfileOverlay: ManageProfileOverlay,
+ DisconnectAccountOverlay: DisconnectAccountOverlay,
CreateProfileOverlay: CreateProfileOverlay,
};
});
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/browser/resources/options/options.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698