summaryrefslogtreecommitdiffstats
path: root/chrome/browser/browser_main.cc
diff options
context:
space:
mode:
authortc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-06 17:15:42 +0000
committertc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-06 17:15:42 +0000
commit1a3861a91760e4f95e580c15592eadc0c13452ae (patch)
tree50410349e0a61ff0b7b63210f9824916569e8f17 /chrome/browser/browser_main.cc
parentb41f1fc60dae06b6b5070d3d12ff2c38b0c0dd52 (diff)
downloadchromium_src-1a3861a91760e4f95e580c15592eadc0c13452ae.zip
chromium_src-1a3861a91760e4f95e580c15592eadc0c13452ae.tar.gz
chromium_src-1a3861a91760e4f95e580c15592eadc0c13452ae.tar.bz2
Fix the "pick a new user data dir" dialog on windows.
There were three things to be fixed: 1) We don't need to run a separate message loop after the dialog closes. The MessageLoopForUI handles this properly. 2) When tearing down browser_process_impl, io_loop hasn't been initialized yet, so we check to make sure it exists before using it. 3) We don't call window->Close() because that deletes the dialog class before we're done using it. This means we leak the window, but that's ok because we're going to exit anyway. Review URL: http://codereview.chromium.org/114004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15422 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser_main.cc')
-rw-r--r--chrome/browser/browser_main.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/chrome/browser/browser_main.cc b/chrome/browser/browser_main.cc
index 9a3b00d..9b675f1 100644
--- a/chrome/browser/browser_main.cc
+++ b/chrome/browser/browser_main.cc
@@ -350,6 +350,10 @@ int BrowserMain(const MainFunctionParams& parameters) {
ProfileManager* profile_manager = browser_process->profile_manager();
Profile* profile = profile_manager->GetDefaultProfile(user_data_dir);
if (!profile) {
+ // Ideally, we should be able to run w/o access to disk. For now, we
+ // prompt the user to pick a different user-data-dir and restart chrome
+ // with the new dir.
+ // http://code.google.com/p/chromium/issues/detail?id=11510
#if defined(OS_WIN)
user_data_dir = FilePath::FromWStringHack(
UserDataDirDialog::RunUserDataDirDialog(user_data_dir.ToWStringHack()));
@@ -358,9 +362,6 @@ int BrowserMain(const MainFunctionParams& parameters) {
user_data_dir = FilePath("/tmp");
#endif
#if defined(OS_WIN) || defined(OS_LINUX)
- // Flush the message loop which lets the UserDataDirDialog close.
- MessageLoop::current()->Run();
-
if (!parameters.ui_task && browser_shutdown::delete_resources_on_shutdown) {
// Only delete the resources if we're not running tests. If we're running
// tests the resources need to be reused as many places in the UI cache