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

Unified Diff: content/browser/download/download_manager_impl_unittest.cc

Issue 9316004: Move common file path related methods between chrome & content to file_util. I reduced the 4 meth... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: remove includes Created 8 years, 11 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 | « content/browser/download/download_item_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/download/download_manager_impl_unittest.cc
===================================================================
--- content/browser/download/download_manager_impl_unittest.cc (revision 119906)
+++ content/browser/download/download_manager_impl_unittest.cc (working copy)
@@ -67,8 +67,7 @@
namespace {
FilePath GetTempDownloadPath(const FilePath& suggested_path) {
- return DownloadFile::AppendSuffixToPath(
- suggested_path, FILE_PATH_LITERAL(".temp"));
+ return FilePath(suggested_path.value() + FILE_PATH_LITERAL(".temp"));
}
class MockDownloadFileFactory
@@ -1159,10 +1158,12 @@
// Construct the unique file name that normally would be created, but
// which we will override.
- int uniquifier = DownloadFile::GetUniquePathNumber(new_path);
+ int uniquifier =
+ file_util::GetUniquePathNumber(new_path, FILE_PATH_LITERAL(""));
FilePath unique_new_path = new_path;
EXPECT_NE(0, uniquifier);
- DownloadFile::AppendNumberToPath(&unique_new_path, uniquifier);
+ unique_new_path = unique_new_path.InsertBeforeExtensionASCII(
+ StringPrintf(" (%d)", uniquifier));
// Normally, the download system takes ownership of info, and is
// responsible for deleting it. In these unit tests, however, we
« no previous file with comments | « content/browser/download/download_item_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698