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

Unified Diff: chrome/browser/download/download_manager.cc

Issue 2850042: Deprecate more old filepath functions. (Closed)
Patch Set: rebase Created 10 years, 5 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
Index: chrome/browser/download/download_manager.cc
diff --git a/chrome/browser/download/download_manager.cc b/chrome/browser/download/download_manager.cc
index b41be085e98f6a324083f8dc06175b6fcb8b8dad..fe4a46330bea3f550a6f88bf411f5a3bb49a40a8 100644
--- a/chrome/browser/download/download_manager.cc
+++ b/chrome/browser/download/download_manager.cc
@@ -1327,8 +1327,9 @@ void DownloadManager::GenerateExtension(
FILE_PATH_LITERAL("download");
// See if our file name already contains an extension.
- FilePath::StringType extension(
- file_util::GetFileExtensionFromPath(file_name));
+ FilePath::StringType extension = file_name.Extension();
+ if (!extension.empty())
tfarina 2010/07/08 17:33:11 The same code block is written in save_package.cc.
Evan Martin 2010/07/08 17:48:47 Yes, I think perhaps including the "." in the Exte
+ extension.erase(extension.begin()); // Erase preceding '.'.
Nico 2010/07/08 17:37:28 Should there be an "ExtensionWithoutDot" method on
#if defined(OS_WIN)
// Rename shell-integrated extensions.

Powered by Google App Engine
This is Rietveld 408576698