summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpam@chromium.org <pam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-24 21:47:22 +0000
committerpam@chromium.org <pam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-24 21:47:22 +0000
commitf2048fc3b51ca9076af1bd728dc727ef0f3c6d3d (patch)
tree66b40c27285d5c9507b3f8323c6d063ff537f77b
parent7f311f29816de59c4030997da19cd0a1dfe4cfb3 (diff)
downloadchromium_src-f2048fc3b51ca9076af1bd728dc727ef0f3c6d3d.zip
chromium_src-f2048fc3b51ca9076af1bd728dc727ef0f3c6d3d.tar.gz
chromium_src-f2048fc3b51ca9076af1bd728dc727ef0f3c6d3d.tar.bz2
Don't clear the profile creation type prematurely.
The profile_creation_type- was being cleared before it was checked to see whether a new window should be opened immediately. Consequently the supervised- user confirmation/welcome overlay was being skipped. BUG=297431 NOTRY=true Review URL: https://chromiumcodereview.appspot.com/24122003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@225071 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/ui/webui/options/create_profile_handler.cc25
1 files changed, 12 insertions, 13 deletions
diff --git a/chrome/browser/ui/webui/options/create_profile_handler.cc b/chrome/browser/ui/webui/options/create_profile_handler.cc
index 76f4a1f..f88bacc 100644
--- a/chrome/browser/ui/webui/options/create_profile_handler.cc
+++ b/chrome/browser/ui/webui/options/create_profile_handler.cc
@@ -249,7 +249,6 @@ void CreateProfileHandler::CreateShortcutAndShowSuccess(
DCHECK_EQ(profile_path_being_created_.value(), profile->GetPath().value());
profile_path_being_created_.clear();
DCHECK_NE(NO_CREATION_IN_PROGRESS, profile_creation_type_);
- profile_creation_type_ = NO_CREATION_IN_PROGRESS;
DictionaryValue dict;
dict.SetString("name",
profile->GetPrefs()->GetString(prefs::kProfileName));
@@ -262,18 +261,18 @@ void CreateProfileHandler::CreateShortcutAndShowSuccess(
GetJavascriptMethodName(PROFILE_CREATION_SUCCESS), dict);
// If the new profile is a supervised user, instead of opening a new window
- // right away, a confirmation overlay will be shown from the creation
- // dialog. However, if we are importing an existing supervised profile or
- // we are creating a new non-supervised user profile we
- // open the new window directly.
- if (profile_creation_type_ == SUPERVISED_PROFILE_CREATION)
- return;
-
- // Opening the new window must be the last action, after all callbacks
- // have been run, to give them a chance to initialize the profile.
- helper::OpenNewWindowForProfile(desktop_type,
- profile,
- Profile::CREATE_STATUS_INITIALIZED);
+ // right away, a confirmation overlay will be shown by JS from the creation
+ // dialog. If we are importing an existing supervised profile or creating a
+ // new non-supervised user profile we don't show any confirmation, so open
+ // the new window now.
+ if (profile_creation_type_ != SUPERVISED_PROFILE_CREATION) {
+ // Opening the new window must be the last action, after all callbacks
+ // have been run, to give them a chance to initialize the profile.
+ helper::OpenNewWindowForProfile(desktop_type,
+ profile,
+ Profile::CREATE_STATUS_INITIALIZED);
+ }
+ profile_creation_type_ = NO_CREATION_IN_PROGRESS;
}
void CreateProfileHandler::ShowProfileCreationError(Profile* profile,