diff options
author | erikkay@google.com <erikkay@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-23 18:39:11 +0000 |
---|---|---|
committer | erikkay@google.com <erikkay@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-23 18:39:11 +0000 |
commit | 051243cb316b88e2c65185de680035f1415b095d (patch) | |
tree | 8d017b3f2dccd03aa27dc2e70a13da59838c4f01 /base/file_path.h | |
parent | 8d7594a03c4c305610a25629c20ed8fbde2b4b17 (diff) | |
download | chromium_src-051243cb316b88e2c65185de680035f1415b095d.zip chromium_src-051243cb316b88e2c65185de680035f1415b095d.tar.gz chromium_src-051243cb316b88e2c65185de680035f1415b095d.tar.bz2 |
Add a method to explicitly request a UTF8 representation of a FilePath. This is for places where you need to use a FilePath in a non-filesystem context (for example, adding a file to an archive file, or constructing a file:// URL).
Review URL: http://codereview.chromium.org/16239
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7423 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/file_path.h')
-rw-r--r-- | base/file_path.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/base/file_path.h b/base/file_path.h index cadf2cf..6d57c97 100644 --- a/base/file_path.h +++ b/base/file_path.h @@ -132,6 +132,10 @@ class FilePath { const StringType& value() const { return path_; } + // Returns value() encoded as a UTF8 std::string. Be careful to not use this + // in places that use filesystem APIs as it won't be portable. + const std::string UTF8Value() const; + // Returns true if |character| is in kSeparators. static bool IsSeparator(CharType character); |