diff options
author | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-15 05:09:50 +0000 |
---|---|---|
committer | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-15 05:09:50 +0000 |
commit | 66ff7356a381d6c8c6c3272b095938408c4f3188 (patch) | |
tree | 9c3ae2fb0d55d1d9650a8071d1c80c557e7f0d93 /chrome/browser | |
parent | 2c8088a4452c2c204237ba9f2f3706e7eeaaf35b (diff) | |
download | chromium_src-66ff7356a381d6c8c6c3272b095938408c4f3188.zip chromium_src-66ff7356a381d6c8c6c3272b095938408c4f3188.tar.gz chromium_src-66ff7356a381d6c8c6c3272b095938408c4f3188.tar.bz2 |
Re-try r29078: Remove some deprecated file_util wstring functions.
With the previous patch, the try bots failed with mysterious messages, so I ignored them, patched it into my windows box and tested it there manually, and found no problems. As it turns out, the try failures were real :(. But nsylvain and I found the problem: the behavior of file_util::GetDirectoryFromPath() differs from DirName() when the path is empty (officially, GetDirectoryFromPath is not supposed to support non-absolute paths, but that is not enforced).
Here is a green win try result: http://build.chromium.org/buildbot/try-server/builders/win/builds/3705
mac: http://build.chromium.org/buildbot/try-server/builders/mac/builds/3491
linux: http://build.chromium.org/buildbot/try-server/builders/linux/builds/3466
I also applied this patch locally in Windows to test that it doesn't break the chrome frame compile or tests, since that's not covered by the trybots yet.
Review URL: http://codereview.chromium.org/271099
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29094 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r-- | chrome/browser/first_run_win.cc | 2 | ||||
-rw-r--r-- | chrome/browser/importer/firefox2_importer.cc | 2 | ||||
-rw-r--r-- | chrome/browser/importer/firefox3_importer.cc | 6 | ||||
-rw-r--r-- | chrome/browser/importer/importer_unittest.cc | 6 | ||||
-rw-r--r-- | chrome/browser/jumplist.cc | 5 | ||||
-rw-r--r-- | chrome/browser/printing/printing_layout_uitest.cc | 3 | ||||
-rw-r--r-- | chrome/browser/tab_contents/navigation_controller_unittest.cc | 2 |
7 files changed, 14 insertions, 12 deletions
diff --git a/chrome/browser/first_run_win.cc b/chrome/browser/first_run_win.cc index d329514..756049e 100644 --- a/chrome/browser/first_run_win.cc +++ b/chrome/browser/first_run_win.cc @@ -311,7 +311,7 @@ bool Upgrade::SwapNewChromeExeIfPresent() { std::wstring new_chrome_exe; if (!GetNewerChromeFile(&new_chrome_exe)) return false; - if (!file_util::PathExists(new_chrome_exe)) + if (!file_util::PathExists(FilePath::FromWStringHack(new_chrome_exe))) return false; std::wstring curr_chrome_exe; if (!PathService::Get(base::FILE_EXE, &curr_chrome_exe)) diff --git a/chrome/browser/importer/firefox2_importer.cc b/chrome/browser/importer/firefox2_importer.cc index c529e39..794d97e 100644 --- a/chrome/browser/importer/firefox2_importer.cc +++ b/chrome/browser/importer/firefox2_importer.cc @@ -291,7 +291,7 @@ void Firefox2Importer::ImportPasswords() { // exist, we try to find its older version. std::wstring file = source_path_; file_util::AppendToPath(&file, L"signons2.txt"); - if (!file_util::PathExists(file)) { + if (!file_util::PathExists(FilePath::FromWStringHack(file))) { file = source_path_; file_util::AppendToPath(&file, L"signons.txt"); } diff --git a/chrome/browser/importer/firefox3_importer.cc b/chrome/browser/importer/firefox3_importer.cc index 10d2855..c347b0c 100644 --- a/chrome/browser/importer/firefox3_importer.cc +++ b/chrome/browser/importer/firefox3_importer.cc @@ -68,7 +68,7 @@ void Firefox3Importer::StartImport(ProfileInfo profile_info, void Firefox3Importer::ImportHistory() { std::wstring file = source_path_; file_util::AppendToPath(&file, L"places.sqlite"); - if (!file_util::PathExists(file)) + if (!file_util::PathExists(FilePath::FromWStringHack(file))) return; sqlite3* sqlite; @@ -116,7 +116,7 @@ void Firefox3Importer::ImportHistory() { void Firefox3Importer::ImportBookmarks() { std::wstring file = source_path_; file_util::AppendToPath(&file, L"places.sqlite"); - if (!file_util::PathExists(file)) + if (!file_util::PathExists(FilePath::FromWStringHack(file))) return; sqlite3* sqlite; @@ -314,7 +314,7 @@ void Firefox3Importer::GetSearchEnginesXMLFiles( std::vector<std::wstring>* files) { std::wstring file = source_path_; file_util::AppendToPath(&file, L"search.sqlite"); - if (!file_util::PathExists(file)) + if (!file_util::PathExists(FilePath::FromWStringHack(file))) return; sqlite3* sqlite; diff --git a/chrome/browser/importer/importer_unittest.cc b/chrome/browser/importer/importer_unittest.cc index b6ef1f6..e6d09af6 100644 --- a/chrome/browser/importer/importer_unittest.cc +++ b/chrome/browser/importer/importer_unittest.cc @@ -49,7 +49,7 @@ class ImporterTest : public testing::Test { virtual void TearDown() { // Deletes the profile and cleans up the profile directory. ASSERT_TRUE(file_util::Delete(test_path_, true)); - ASSERT_FALSE(file_util::PathExists(test_path_)); + ASSERT_FALSE(file_util::PathExists(FilePath::FromWStringHack(test_path_))); } void Firefox3xImporterTest(std::wstring profile_dir, @@ -70,7 +70,7 @@ class ImporterTest : public testing::Test { if (import_search_plugins) { ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &data_path)); file_util::AppendToPath(&data_path, L"firefox3_searchplugins"); - if (!file_util::PathExists(data_path)) { + if (!file_util::PathExists(FilePath::FromWStringHack(data_path))) { // TODO(maruel): Create search test data that we can open source! LOG(ERROR) << L"Missing internal test data"; return; @@ -646,7 +646,7 @@ TEST_F(ImporterTest, Firefox2Importer) { CreateDirectory(search_engine_path.c_str(), NULL); ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &data_path)); file_util::AppendToPath(&data_path, L"firefox2_searchplugins"); - if (!file_util::PathExists(data_path)) { + if (!file_util::PathExists(FilePath::FromWStringHack(data_path))) { // TODO(maruel): Create test data that we can open source! LOG(ERROR) << L"Missing internal test data"; return; diff --git a/chrome/browser/jumplist.cc b/chrome/browser/jumplist.cc index 69c2a9c..3dd2c55 100644 --- a/chrome/browser/jumplist.cc +++ b/chrome/browser/jumplist.cc @@ -486,9 +486,10 @@ void JumpListUpdateTask::Run() { // icon directory, and create a new directory which contains new JumpList // icon files. std::wstring icon_dir_old(icon_dir_ + L"Old"); - if (file_util::PathExists(icon_dir_old)) + if (file_util::PathExists(FilePath::FromWStringHack(icon_dir_old))) file_util::Delete(icon_dir_old, true); - file_util::Move(icon_dir_, icon_dir_old); + file_util::Move(FilePath::FromWStringHack(icon_dir_), + FilePath::FromWStringHack(icon_dir_old)); file_util::CreateDirectory(icon_dir_); // Create temporary icon files for shortcuts in the "Most Visited" category. diff --git a/chrome/browser/printing/printing_layout_uitest.cc b/chrome/browser/printing/printing_layout_uitest.cc index a5de41a..c3bfb6b 100644 --- a/chrome/browser/printing/printing_layout_uitest.cc +++ b/chrome/browser/printing/printing_layout_uitest.cc @@ -73,7 +73,8 @@ class PrintingLayoutTest : public PrintingTest<UITest> { FilePath png(verification_file + L".png"); // Looks for Cleartype override. - if (file_util::PathExists(verification_file + L"_cleartype.png") && + if (file_util::PathExists( + FilePath::FromWStringHack(verification_file + L"_cleartype.png")) && IsClearTypeEnabled()) { png = FilePath(verification_file + L"_cleartype.png"); } diff --git a/chrome/browser/tab_contents/navigation_controller_unittest.cc b/chrome/browser/tab_contents/navigation_controller_unittest.cc index 9dc51d4..fc31c75 100644 --- a/chrome/browser/tab_contents/navigation_controller_unittest.cc +++ b/chrome/browser/tab_contents/navigation_controller_unittest.cc @@ -88,7 +88,7 @@ class NavigationControllerHistoryTest : public NavigationControllerTest { NavigationControllerTest::TearDown(); ASSERT_TRUE(file_util::Delete(test_dir_, true)); - ASSERT_FALSE(file_util::PathExists(test_dir_)); + ASSERT_FALSE(file_util::PathExists(FilePath::FromWStringHack(test_dir_))); } // Deletes the current profile manager and creates a new one. Indirectly this |