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

Unified Diff: base/file_util.h

Issue 12212010: Truncate the download file name if it exceeds the filesystem limit. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add test. Created 7 years, 10 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: base/file_util.h
diff --git a/base/file_util.h b/base/file_util.h
index 254f32607b6b0064b20aed4092dcbe38cfe84f8d..6a8fd052bf753ac7f65b63e5661cc5dbb8b99b0f 100644
--- a/base/file_util.h
+++ b/base/file_util.h
@@ -422,6 +422,10 @@ BASE_EXPORT bool VerifyPathControlledByUser(const base::FilePath& base,
BASE_EXPORT bool VerifyPathControlledByAdmin(const base::FilePath& path);
#endif // defined(OS_MACOSX) && !defined(OS_IOS)
+// Returns the maximum length of path component on the volume containing
+// the directory |path|, in the number of FilePath::CharType, or -1 on failure.
+BASE_EXPORT int GetMaximumPathComponentLength(const base::FilePath& path);
+
// A class to handle auto-closing of FILE*'s.
class ScopedFILEClose {
public:
« no previous file with comments | « no previous file | base/file_util_posix.cc » ('j') | chrome/browser/download/download_path_reservation_tracker.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698