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

Unified Diff: chrome/browser/ui/webui/options/manage_profile_handler.cc

Issue 15734006: Restructure user-creation flow and surface errors (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Removed log; patch for commit. Created 7 years, 7 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/browser/ui/webui/options/browser_options_handler.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/options/manage_profile_handler.cc
===================================================================
--- chrome/browser/ui/webui/options/manage_profile_handler.cc (revision 202001)
+++ chrome/browser/ui/webui/options/manage_profile_handler.cc (working copy)
@@ -60,6 +60,20 @@
return base::GetValueAsFilePath(*file_path_value, profile_file_path);
}
+void OnNewDefaultProfileCreated(
+ chrome::HostDesktopType desktop_type,
+ Profile* profile,
+ Profile::CreateStatus status) {
+ if (status == Profile::CREATE_STATUS_INITIALIZED) {
+ ProfileManager::FindOrCreateNewWindowForProfile(
+ profile,
+ chrome::startup::IS_PROCESS_STARTUP,
+ chrome::startup::IS_FIRST_RUN,
+ desktop_type,
+ false);
+ }
+}
+
} // namespace
ManageProfileHandler::ManageProfileHandler()
@@ -88,6 +102,7 @@
{ "createProfileTitle", IDS_PROFILES_CREATE_TITLE },
{ "createProfileInstructions", IDS_PROFILES_CREATE_INSTRUCTIONS },
{ "createProfileConfirm", IDS_PROFILES_CREATE_CONFIRM },
+ { "createProfileLocalError", IDS_PROFILES_CREATE_LOCAL_ERROR },
{ "createProfileShortcut", IDS_PROFILES_CREATE_SHORTCUT },
{ "removeProfileShortcut", IDS_PROFILES_REMOVE_SHORTCUT },
};
@@ -328,7 +343,8 @@
desktop_type = browser->host_desktop_type();
g_browser_process->profile_manager()->ScheduleProfileForDeletion(
- profile_file_path, desktop_type);
+ profile_file_path,
+ base::Bind(&OnNewDefaultProfileCreated, desktop_type));
}
#if defined(ENABLE_SETTINGS_APP)
« no previous file with comments | « chrome/browser/ui/webui/options/browser_options_handler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698