diff options
author | robertshield@chromium.org <robertshield@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-28 00:25:34 +0000 |
---|---|---|
committer | robertshield@chromium.org <robertshield@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-28 00:25:34 +0000 |
commit | fd1e44cd31fc8c90d39479a5fe4bae6019a989b3 (patch) | |
tree | c615848c4a19eabd5b30918b4c233796136ef986 /chrome/installer | |
parent | 7a28f1690831eeb3c33d259a7bad9e676ce41ed7 (diff) | |
download | chromium_src-fd1e44cd31fc8c90d39479a5fe4bae6019a989b3.zip chromium_src-fd1e44cd31fc8c90d39479a5fe4bae6019a989b3.tar.gz chromium_src-fd1e44cd31fc8c90d39479a5fe4bae6019a989b3.tar.bz2 |
Remove the Chrome Frame preprocessor define in chrome_constants.cc and deal with resulting fallout.
Also, remove several instances of Chrome Frame using wstrings instead of FilePaths.
The main goal of this patch is to move towards ensuring that Chrome Frame and Google Chrome share binary-identical exes and dlls except for setup.exe and mini_installer.exe.
Review URL: http://codereview.chromium.org/338025
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30290 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/installer')
-rw-r--r-- | chrome/installer/setup/uninstall.cc | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/chrome/installer/setup/uninstall.cc b/chrome/installer/setup/uninstall.cc index 2ad8cf2..1a99803 100644 --- a/chrome/installer/setup/uninstall.cc +++ b/chrome/installer/setup/uninstall.cc @@ -176,17 +176,27 @@ DeleteResult DeleteFilesAndFolders(const std::wstring& exe_path, file_util::Move(setup_exe_path, temp_file); } - // Move the browser's persisted local state + // Obtain the location of the user profile data. Chrome Frame needs to + // build this path manually since it doesn't use the Chrome default dir. FilePath user_local_state; - if (chrome::GetDefaultUserDataDirectory(&user_local_state)) { +#if defined(CHROME_FRAME_BUILD) + bool got_local_state = + chrome::GetChromeFrameUserDataDirectory(&user_local_state); +#else // if !defined(CHROME_FRAME_BUILD) + bool got_local_state = chrome::GetDefaultUserDataDirectory(&user_local_state); +#endif + + // Move the browser's persisted local state + if (got_local_state) { FilePath user_local_file( user_local_state.Append(chrome::kLocalStateFilename)); - FilePath path = FilePath::FromWStringHack(*local_state_path); if (!file_util::CreateTemporaryFile(&path)) LOG(ERROR) << "Failed to create temporary file for Local State."; else file_util::CopyFile(user_local_file, path); + } else { + LOG(ERROR) << "Could not retrieve user's profile directory."; } DeleteResult result = DELETE_SUCCEEDED; @@ -210,7 +220,7 @@ DeleteResult DeleteFilesAndFolders(const std::wstring& exe_path, #endif } - if (delete_profile) { + if (delete_profile && got_local_state) { LOG(INFO) << "Deleting user profile" << user_local_state.value(); if (!file_util::Delete(user_local_state, true)) { LOG(ERROR) << "Failed to delete user profile dir: " @@ -521,4 +531,4 @@ installer_util::InstallStatus installer_setup::UninstallChrome( file_util::Delete(local_state_path, false); return ret; -} +}
\ No newline at end of file |