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

Unified Diff: chrome/browser/profiles/profile_window.cc

Issue 2061593002: Fix crash when switching to a profile that cannot be opened (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bug-614753-fix
Patch Set: Respond to pkasting@'s 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
Index: chrome/browser/profiles/profile_window.cc
diff --git a/chrome/browser/profiles/profile_window.cc b/chrome/browser/profiles/profile_window.cc
index f9b2b362c7b0b84513a621516727f19eb7e64275..706acb5418707eb970a97f68de9450c26a4c895c 100644
--- a/chrome/browser/profiles/profile_window.cc
+++ b/chrome/browser/profiles/profile_window.cc
@@ -34,9 +34,11 @@
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_dialogs.h"
#include "chrome/browser/ui/profile_chooser_constants.h"
+#include "chrome/browser/ui/profile_error_dialog.h"
#include "chrome/browser/ui/user_manager.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/url_constants.h"
+#include "chrome/grit/generated_resources.h"
#include "components/browser_sync/browser/profile_sync_service.h"
#include "components/flags_ui/pref_service_flags_storage.h"
#include "components/prefs/pref_service.h"
@@ -230,6 +232,11 @@ void OpenBrowserWindowForProfile(
Profile::CreateStatus status) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
+ if (status == Profile::CREATE_STATUS_LOCAL_FAIL) {
+ ShowProfileErrorDialog(PROFILE_ERROR_SWITCH_TO_FAILURE,
+ IDS_COULDNT_OPEN_PROFILE_ERROR);
+ }
+
if (status != Profile::CREATE_STATUS_INITIALIZED)
return;

Powered by Google App Engine
This is Rietveld 408576698