summaryrefslogtreecommitdiffstats
path: root/base
diff options
context:
space:
mode:
authorthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-09 20:00:13 +0000
committerthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-09 20:00:13 +0000
commitef5ff1b40f1024d834620f5cede62dfd4aea6e0c (patch)
tree3935dae6b7f1ab45c01bc8f66d6bfee7338d9a9a /base
parent0bbb1b1f9842366babce756ab2f1713832be63de (diff)
downloadchromium_src-ef5ff1b40f1024d834620f5cede62dfd4aea6e0c.zip
chromium_src-ef5ff1b40f1024d834620f5cede62dfd4aea6e0c.tar.gz
chromium_src-ef5ff1b40f1024d834620f5cede62dfd4aea6e0c.tar.bz2
Fix to use FilePath version of PathService::Get.
BUG=None TEST=None Original Review URL: http://codereview.chromium.org/174189 Patch from Thiago Farina <thiago.farina@gmail.com>. Review URL: http://codereview.chromium.org/193047 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25778 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r--base/file_version_info.cc2
-rw-r--r--base/file_version_info_unittest.cc23
2 files changed, 12 insertions, 13 deletions
diff --git a/base/file_version_info.cc b/base/file_version_info.cc
index 4f7f23d..f9bee21 100644
--- a/base/file_version_info.cc
+++ b/base/file_version_info.cc
@@ -32,7 +32,7 @@ typedef struct {
// static
FileVersionInfo* FileVersionInfo::CreateFileVersionInfoForCurrentModule() {
- std::wstring app_path;
+ FilePath app_path;
if (!PathService::Get(base::FILE_MODULE, &app_path))
return NULL;
diff --git a/base/file_version_info_unittest.cc b/base/file_version_info_unittest.cc
index 43b1fcc..676e950 100644
--- a/base/file_version_info_unittest.cc
+++ b/base/file_version_info_unittest.cc
@@ -13,12 +13,12 @@ namespace {
class FileVersionInfoTest : public testing::Test {
};
-std::wstring GetTestDataPath() {
- std::wstring path;
+FilePath GetTestDataPath() {
+ FilePath path;
PathService::Get(base::DIR_SOURCE_ROOT, &path);
- file_util::AppendToPath(&path, L"base");
- file_util::AppendToPath(&path, L"data");
- file_util::AppendToPath(&path, L"file_version_info_unittest");
+ path = path.AppendASCII("base");
+ path = path.AppendASCII("data");
+ path = path.AppendASCII("file_version_info_unittest");
return path;
}
@@ -47,12 +47,11 @@ TEST(FileVersionInfoTest, HardCodedProperties) {
L"This is the legal copyright", // legal_copyright
L"This is the legal trademarks", // legal_trademarks
L"This is the last change", // last_change
-
};
for (int i = 0; i < arraysize(kDLLNames); ++i) {
- std::wstring dll_path = GetTestDataPath();
- file_util::AppendToPath(&dll_path, kDLLNames[i]);
+ FilePath dll_path = GetTestDataPath();
+ dll_path = dll_path.Append(kDLLNames[i]);
scoped_ptr<FileVersionInfo> version_info(
FileVersionInfo::CreateFileVersionInfo(dll_path));
@@ -93,8 +92,8 @@ TEST(FileVersionInfoTest, IsOfficialBuild) {
ASSERT_EQ(arraysize(kDLLNames), arraysize(kExpected));
for (int i = 0; i < arraysize(kDLLNames); ++i) {
- std::wstring dll_path = GetTestDataPath();
- file_util::AppendToPath(&dll_path, kDLLNames[i]);
+ FilePath dll_path = GetTestDataPath();
+ dll_path = dll_path.Append(kDLLNames[i]);
scoped_ptr<FileVersionInfo> version_info(
FileVersionInfo::CreateFileVersionInfo(dll_path));
@@ -105,8 +104,8 @@ TEST(FileVersionInfoTest, IsOfficialBuild) {
#endif
TEST(FileVersionInfoTest, CustomProperties) {
- std::wstring dll_path = GetTestDataPath();
- file_util::AppendToPath(&dll_path, L"FileVersionInfoTest1.dll");
+ FilePath dll_path = GetTestDataPath();
+ dll_path = dll_path.AppendASCII("FileVersionInfoTest1.dll");
scoped_ptr<FileVersionInfo> version_info(
FileVersionInfo::CreateFileVersionInfo(dll_path));