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

Unified Diff: chrome/installer/setup/uninstall.cc

Issue 338025: Remove the Chrome Frame preprocessor define in chrome_constants.cc (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 2 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/installer/setup/uninstall.cc
===================================================================
--- chrome/installer/setup/uninstall.cc (revision 30046)
+++ chrome/installer/setup/uninstall.cc (working copy)
@@ -176,17 +176,27 @@
file_util::Move(setup_exe_path, temp_file);
}
+ // 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 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
- FilePath user_local_state;
- if (chrome::GetDefaultUserDataDirectory(&user_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 @@
#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 @@
file_util::Delete(local_state_path, false);
return ret;
-}
+}

Powered by Google App Engine
This is Rietveld 408576698