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

Unified Diff: base/file_util.h

Issue 12620: Append a trailing slash on file directory URLs. Thus a link to /directory wil... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years, 1 month 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 | « no previous file | base/file_util.cc » ('j') | net/url_request/url_request_file_dir_job.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/file_util.h
===================================================================
--- base/file_util.h (revision 5946)
+++ base/file_util.h (working copy)
@@ -41,12 +41,17 @@
// Returns a vector of all of the components of the provided path.
void PathComponents(const std::wstring& path,
std::vector<std::wstring>* components);
-
+
// Returns true if the given path ends with a path separator character.
-// TODO(erikkay): remove this pointer version
+bool EndsWithSeparator(const FilePath& path);
+// These two versions are both deprecated. TODO(estade): remove them.
bool EndsWithSeparator(std::wstring* path);
bool EndsWithSeparator(const std::wstring& path);
-
+
+// Makes sure that |path| ends with a separator IFF path is a directory that
+// exists. Returns true if |path| is an existing directory, false otherwise.
+bool EnsureEndsWithSeparator(FilePath* path);
+
// Modifies a string by trimming all trailing separators from the end.
void TrimTrailingSeparator(std::wstring* dir);
« no previous file with comments | « no previous file | base/file_util.cc » ('j') | net/url_request/url_request_file_dir_job.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698