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

Unified Diff: content/browser/download/download_file_manager_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_file_manager.cc ('k') | content/browser/download/download_item_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/download/download_file_manager_unittest.cc
===================================================================
--- content/browser/download/download_file_manager_unittest.cc (revision 119906)
+++ content/browser/download/download_file_manager_unittest.cc (working copy)
@@ -295,9 +295,12 @@
int uniquifier = 0;
if (is_complete && !replace) {
- uniquifier = content::DownloadFile::GetUniquePathNumber(new_path);
- if (uniquifier > 0)
- content::DownloadFile::AppendNumberToPath(&unique_path, uniquifier);
+ uniquifier =
+ file_util::GetUniquePathNumber(new_path, FILE_PATH_LITERAL(""));
+ if (uniquifier > 0) {
+ unique_path = unique_path.InsertBeforeExtensionASCII(
+ StringPrintf(" (%d)", uniquifier));
+ }
}
EXPECT_CALL(*file, Rename(unique_path))
« no previous file with comments | « content/browser/download/download_file_manager.cc ('k') | content/browser/download/download_item_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698