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

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: 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..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,
};
});
« 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