diff options
author | mbelshe@google.com <mbelshe@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-09 01:00:46 +0000 |
---|---|---|
committer | mbelshe@google.com <mbelshe@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-09 01:00:46 +0000 |
commit | 4220edc570b77621d9832e86d6eb822a6fa14523 (patch) | |
tree | e69e09a54b14dbd33df9bca37a0090d48c59dc87 /net/flip/flip_session.cc | |
parent | 93be709bf1fb20f800ad65d4c95b97370d70f033 (diff) | |
download | chromium_src-4220edc570b77621d9832e86d6eb822a6fa14523.zip chromium_src-4220edc570b77621d9832e86d6eb822a6fa14523.tar.gz chromium_src-4220edc570b77621d9832e86d6eb822a6fa14523.tar.bz2 |
One more try to get the FilePath usage right.
I was using:
FilePath("/")
This only works on linux/mac because it is an ascii string and can't be
coerced to a wide string.
Reworked the code to put the hack into the string portion.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/270035
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28497 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/flip/flip_session.cc')
-rw-r--r-- | net/flip/flip_session.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/net/flip/flip_session.cc b/net/flip/flip_session.cc index d791487..ef47540 100644 --- a/net/flip/flip_session.cc +++ b/net/flip/flip_session.cc @@ -174,16 +174,17 @@ void CreateFlipHeadersFromHttpRequest( // up to a test server. // For testing content on our test server, we modify the URL. GURL url = info->url; - FilePath path(UrlToFilenameEncoder::Encode(url.spec(), FilePath("/"))); + FilePath path(UrlToFilenameEncoder::Encode(url.spec(), FilePath())); // We do the unusual conversion from a FilePath::StringType to // an ascii string. Recognize that StringType is a wstring on windows, // so a failure is technically possible, but this is just used as a test // case, so it's okay. This code will be deleted. + std::string hack_url("/"); #if defined(OS_WIN) - std::string hack_url = WideToASCII(path.value()); + hack_url.append(WideToASCII(path.value())); #else - std::string hack_url = path.value(); + hack_url.append(path.value()); #endif // switch backslashes. HACK |