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

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

Issue 6069004: Use FilePath::BaseName instead of the deprecated file_util::GetFilenameFromPath. Part 3. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 10 years 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/test/mini_installer_test/chrome_mini_installer.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/mini_installer_test/mini_installer_test_util.cc
diff --git a/chrome/test/mini_installer_test/mini_installer_test_util.cc b/chrome/test/mini_installer_test/mini_installer_test_util.cc
index 1fb022740cdcc008aee7d3550aeb185746c1d659..a07ada566e7b7df5cff0b7889c4d5b70d046a954 100644
--- a/chrome/test/mini_installer_test/mini_installer_test_util.cc
+++ b/chrome/test/mini_installer_test/mini_installer_test_util.cc
@@ -90,7 +90,7 @@ std::wstring MiniInstallerTestUtil::GetFilePath(const wchar_t* exe_name) {
PathService::Get(base::DIR_EXE, &installer_path);
installer_path = installer_path.Append(exe_name);
VLOG(1) << "Chrome exe path: " << installer_path.value().c_str();
- return installer_path.ToWStringHack();
+ return installer_path.value();
}
// This method will first call GetLatestFile to get the list of all
@@ -168,9 +168,9 @@ bool MiniInstallerTestUtil::GetLatestFile(const wchar_t* file_name,
// This method retrieves the previous build version for the given diff
// installer path.
bool MiniInstallerTestUtil::GetPreviousBuildNumber(const std::wstring& path,
- std::wstring *build_number) {
+ std::wstring *build_number) {
- std::wstring diff_name = file_util::GetFilenameFromPath(path);
+ std::wstring diff_name = FilePath(path).BaseName().value();
// We want to remove 'from_', so add its length to found index (which is 5)
std::wstring::size_type start_position = diff_name.find(L"from_") + 5;
std::wstring::size_type end_position = diff_name.find(L"_c");
@@ -188,7 +188,7 @@ bool MiniInstallerTestUtil::GetPreviousBuildNumber(const std::wstring& path,
if (folder.empty())
return false;
- build_number->assign(folder.BaseName().ToWStringHack());
+ build_number->assign(folder.BaseName().value());
return true;
}
« no previous file with comments | « chrome/test/mini_installer_test/chrome_mini_installer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698