summaryrefslogtreecommitdiffstats
path: root/base/file_path.h
diff options
context:
space:
mode:
authorevanm@google.com <evanm@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-30 23:54:04 +0000
committerevanm@google.com <evanm@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-30 23:54:04 +0000
commit640517fdd23e08ed95cf129d27457db817ee6124 (patch)
tree2674bc857b9d1b566e05bcfa1dd5c8cfd1897dbf /base/file_path.h
parentf92ed219c9aeeed79993d1d32f34e5d5c9888dbe (diff)
downloadchromium_src-640517fdd23e08ed95cf129d27457db817ee6124.zip
chromium_src-640517fdd23e08ed95cf129d27457db817ee6124.tar.gz
chromium_src-640517fdd23e08ed95cf129d27457db817ee6124.tar.bz2
Begin the first small step towards using FilePath everywhere:
- Add some transition APIs. - Start migrating some code to transition APIs. Review URL: http://codereview.chromium.org/8825 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4254 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/file_path.h')
-rw-r--r--base/file_path.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/base/file_path.h b/base/file_path.h
index cb46f36..7dd2a71 100644
--- a/base/file_path.h
+++ b/base/file_path.h
@@ -145,6 +145,20 @@ class FilePath {
// platforms, an absolute path begins with a separator character.
bool IsAbsolute() const;
+ // Older Chromium code assumes that paths are always wstrings.
+ // This function converts a wstring to a FilePath, and is useful to smooth
+ // porting that old code to the FilePath API.
+ // It has "Hack" in its name so people feel bad about using it.
+ // TODO(port): remove these functions.
+ static FilePath FromWStringHack(const std::wstring& wstring);
+
+ // Older Chromium code assumes that paths are always wstrings.
+ // This function produces a wstring from a FilePath, and is useful to smooth
+ // porting that old code to the FilePath API.
+ // It has "Hack" in its name so people feel bad about using it.
+ // TODO(port): remove these functions.
+ std::wstring ToWStringHack() const;
+
private:
// If this FilePath contains a drive letter specification, returns the
// position of the last character of the drive letter specification,