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

Unified Diff: chrome/test/mini_installer_test/installer_test_util.cc

Issue 9585001: Cleanup: Remove deprecated version of file_util::AppendToPath(). (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 9 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
« no previous file with comments | « chrome/browser/printing/printing_layout_uitest.cc ('k') | content/common/sandbox_policy.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/mini_installer_test/installer_test_util.cc
===================================================================
--- chrome/test/mini_installer_test/installer_test_util.cc (revision 125906)
+++ chrome/test/mini_installer_test/installer_test_util.cc (working copy)
@@ -56,28 +56,24 @@
if (version.empty())
return false;
FilePath path;
- if (!GetInstallDirectory(system_level,
- ToBrowserDistributionType(type), &path) ||
- !file_util::PathExists(path))
+ bool has_install_dir = GetInstallDirectory(system_level,
+ ToBrowserDistributionType(type),
+ &path);
+ if (!has_install_dir || !file_util::PathExists(path))
return false;
path = path.AppendASCII(version);
- if (!file_util::Delete(path, true))
- return false;
- return true;
+ return file_util::Delete(path, true);
}
bool DeleteRegistryKey(bool system_level,
InstallationValidator::InstallationType type) {
- FilePath::StringType key(google_update::kRegPathClients);
BrowserDistribution* dist = BrowserDistribution::GetSpecificDistribution(
ToBrowserDistributionType(type));
- file_util::AppendToPath(&key, dist->GetAppGuid());
- HKEY root = HKEY_CURRENT_USER;
- if (system_level)
- root = HKEY_LOCAL_MACHINE;
- if (InstallUtil::DeleteRegistryKey(root, key))
- return true;
- return false;
+ FilePath::StringType key(google_update::kRegPathClients);
+ key.push_back(FilePath::kSeparators[0]);
+ key.append(dist->GetAppGuid());
+ HKEY root = system_level ? HKEY_LOCAL_MACHINE : HKEY_CURRENT_USER;
+ return InstallUtil::DeleteRegistryKey(root, key);
}
bool GetChromeInstallDirectory(bool system_level, FilePath* path) {
@@ -303,4 +299,3 @@
}
} // namespace
-
« no previous file with comments | « chrome/browser/printing/printing_layout_uitest.cc ('k') | content/common/sandbox_policy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698