diff options
author | avi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-28 21:54:32 +0000 |
---|---|---|
committer | avi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-28 21:54:32 +0000 |
commit | f7011fcb7f28651953b1765b241c974e25c8cd40 (patch) | |
tree | f3a2c97bb98cc12aaca39bb27791998f026b58b7 /chrome/browser/browser_main.cc | |
parent | 4663213354a9c41ab0e5a785d52bf5c9a9692514 (diff) | |
download | chromium_src-f7011fcb7f28651953b1765b241c974e25c8cd40.zip chromium_src-f7011fcb7f28651953b1765b241c974e25c8cd40.tar.gz chromium_src-f7011fcb7f28651953b1765b241c974e25c8cd40.tar.bz2 |
Porting profiles to the Mac.
Review URL: http://codereview.chromium.org/19623
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8831 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser_main.cc')
-rw-r--r-- | chrome/browser/browser_main.cc | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/chrome/browser/browser_main.cc b/chrome/browser/browser_main.cc index 8431d5d..980ae97 100644 --- a/chrome/browser/browser_main.cc +++ b/chrome/browser/browser_main.cc @@ -22,6 +22,7 @@ #include "chrome/browser/browser_main_win.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/plugin_service.h" +#include "chrome/browser/profile_manager.h" #include "chrome/browser/shell_integration.h" #include "chrome/common/chrome_constants.h" #include "chrome/common/chrome_paths.h" @@ -215,7 +216,7 @@ int BrowserMain(const MainFunctionParams& parameters) { main_message_loop.set_thread_name(thread_name); bool already_running = Upgrade::IsBrowserAlreadyRunning(); - std::wstring user_data_dir; + FilePath user_data_dir; PathService::Get(chrome::DIR_USER_DATA, &user_data_dir); MessageWindow message_window(user_data_dir); @@ -263,8 +264,7 @@ int BrowserMain(const MainFunctionParams& parameters) { // On first run, we need to process the master preferences before the // browser's profile_manager object is created. first_run_ui_bypass = - !FirstRun::ProcessMasterPreferences(user_data_dir, - std::wstring(), NULL); + !FirstRun::ProcessMasterPreferences(user_data_dir, FilePath(), NULL); // If we are running in App mode, we do not want to show the importer // (first run) UI. @@ -318,7 +318,8 @@ int BrowserMain(const MainFunctionParams& parameters) { Profile* profile = profile_manager->GetDefaultProfile(user_data_dir); if (!profile) { #if defined(OS_WIN) - user_data_dir = UserDataDirDialog::RunUserDataDirDialog(user_data_dir); + user_data_dir = FilePath::FromWStringHack( + UserDataDirDialog::RunUserDataDirDialog(user_data_dir.ToWStringHack())); // Flush the message loop which lets the UserDataDirDialog close. MessageLoop::current()->Run(); @@ -331,7 +332,7 @@ int BrowserMain(const MainFunctionParams& parameters) { // sounds risky if we parse differently than CommandLineToArgvW. CommandLine new_command_line = parsed_command_line; new_command_line.AppendSwitchWithValue(switches::kUserDataDir, - user_data_dir); + user_data_dir.ToWStringHack()); base::LaunchApp(new_command_line, false, false, NULL); } |