Commit fe71ee35 authored by rsimha@chromium.org's avatar rsimha@chromium.org

[sync] Prevent SyncSetupOverlay.closeOverlay() from closing non-sync overlays

The chrome webui settings page contains code to hide the sync settings
overlay if sync is disabled or if the user is signed out in the
background while the overlay is visible. It does so by calling the
SyncSetupOverlay.CloseOverlay() function.

It turns out that if SyncSetupOverlay.closeOverlay() is called when
the sync settings overlay is not visible, it will close whatever overlay
is visible (in case of bug 244141, the clear-browsing-data overlay).

This patch modifies SyncSetupOverlay.CloseOverlay() to only close the
sync setup overlay if it is visible, and not any other overlay.

BUG=244141
TEST=All non-sync settings UI overlays must stay visible when the user is disconnected or when sync is disabled.
R=zea@chromium.org

Review URL: https://codereview.chromium.org/15740030

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@202687 0039d316-1c4b-4281-b951-d872f2087c98
parent 18d26676
......@@ -123,7 +123,9 @@ cr.define('options', function() {
closeOverlay_: function() {
this.syncConfigureArgs_ = null;
this.dataTypeBoxes_ = {};
OptionsPage.closeOverlay();
var overlay = $('sync-setup-overlay');
if (!overlay.hidden)
OptionsPage.closeOverlay();
},
/** @override */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment