diff options
author | asvitkine@chromium.org <asvitkine@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-04 04:49:50 +0000 |
---|---|---|
committer | asvitkine@chromium.org <asvitkine@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-04 04:49:50 +0000 |
commit | 5a050ff4ea7a7ce4ff1605bc75db3200c88d553d (patch) | |
tree | 53d73e4f0fef1da3e67a8ba3047b92f86f3d32aa /chrome/installer/util/install_util.cc | |
parent | ed30448e7fc4a1b753a305c5a63eaf3b54fa027c (diff) | |
download | chromium_src-5a050ff4ea7a7ce4ff1605bc75db3200c88d553d.zip chromium_src-5a050ff4ea7a7ce4ff1605bc75db3200c88d553d.tar.gz chromium_src-5a050ff4ea7a7ce4ff1605bc75db3200c88d553d.tar.bz2 |
Windows: Remove desktop profile shortcuts (and any others pointing to the exe) on uninstall.
This is a re-land of https://codereview.chromium.org/11693010/, which failed on the tree on XP bots. The issue was that ProgramCompare::Evaluate() was parsing its value parameter is a command-line, which meant it was truncating it at the first space. This updated CL adds an EvaluatePath() function that takes a FilePath and doesn't try to parse it as a command-line.
BUG=146636
TEST=Uninstalling Chrome removes any present profile shortcuts on the desktop.
Review URL: https://chromiumcodereview.appspot.com/11743022
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@175104 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/installer/util/install_util.cc')
-rw-r--r-- | chrome/installer/util/install_util.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/chrome/installer/util/install_util.cc b/chrome/installer/util/install_util.cc index d98a30b..3c8504e 100644 --- a/chrome/installer/util/install_util.cc +++ b/chrome/installer/util/install_util.cc @@ -569,8 +569,12 @@ bool InstallUtil::ProgramCompare::Evaluate(const string16& value) const { return false; } + return EvaluatePath(program); +} + +bool InstallUtil::ProgramCompare::EvaluatePath(const FilePath& path) const { // Try the simple thing first: do the paths happen to match? - if (FilePath::CompareEqualIgnoreCase(path_to_match_.value(), program.value())) + if (FilePath::CompareEqualIgnoreCase(path_to_match_.value(), path.value())) return true; // If the paths don't match and we couldn't open the expected file, we've done @@ -582,7 +586,7 @@ bool InstallUtil::ProgramCompare::Evaluate(const string16& value) const { base::win::ScopedHandle handle; BY_HANDLE_FILE_INFORMATION info = {}; - return (OpenForInfo(program, &handle) && + return (OpenForInfo(path, &handle) && GetInfo(handle, &info) && info.dwVolumeSerialNumber == file_info_.dwVolumeSerialNumber && info.nFileIndexHigh == file_info_.nFileIndexHigh && |