summaryrefslogtreecommitdiffstats
path: root/media/test
diff options
context:
space:
mode:
authorevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-16 21:50:13 +0000
committerevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-16 21:50:13 +0000
commite83eedcd41bdebf055f130051d2c84d39f27a466 (patch)
tree2108eb93717e3629397246e25b98afe3798525c9 /media/test
parente62dbbfc6f722159733239d396098e2e0407f56f (diff)
downloadchromium_src-e83eedcd41bdebf055f130051d2c84d39f27a466.zip
chromium_src-e83eedcd41bdebf055f130051d2c84d39f27a466.tar.gz
chromium_src-e83eedcd41bdebf055f130051d2c84d39f27a466.tar.bz2
file_util: deprecate remaining wstring functions
This removes the last wstring-accepting functions from file_util on non-Windows platforms. BUG=24672 Review URL: http://codereview.chromium.org/3005005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52755 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/test')
-rw-r--r--media/test/ffmpeg_tests/ffmpeg_tests.cc14
1 files changed, 9 insertions, 5 deletions
diff --git a/media/test/ffmpeg_tests/ffmpeg_tests.cc b/media/test/ffmpeg_tests/ffmpeg_tests.cc
index 0b95b00..47dd1b1 100644
--- a/media/test/ffmpeg_tests/ffmpeg_tests.cc
+++ b/media/test/ffmpeg_tests/ffmpeg_tests.cc
@@ -70,6 +70,9 @@ int main(int argc, const char** argv) {
CommandLine::Init(argc, argv);
const CommandLine* cmd_line = CommandLine::ForCurrentProcess();
+ // TODO(evanm): GetLooseValues() should return a
+ // CommandLine::StringType, which can be converted to FilePaths
+ // directly.
std::vector<std::wstring> filenames(cmd_line->GetLooseValues());
if (filenames.empty()) {
@@ -86,10 +89,11 @@ int main(int argc, const char** argv) {
}
// Retrieve command line options.
- std::string in_path(WideToUTF8(filenames[0]));
- std::string out_path;
+ std::string in_path(WideToASCII(filenames[0]));
+ FilePath out_path;
if (filenames.size() > 1) {
- out_path = WideToUTF8(filenames[1]);
+ // See TODO above the declaration of filenames.
+ out_path = FilePath::FromWStringHack(filenames[1]);
}
// Default flags that match Chrome defaults.
@@ -137,10 +141,10 @@ int main(int argc, const char** argv) {
// Open output file.
FILE *output = NULL;
if (!out_path.empty()) {
- output = file_util::OpenFile(out_path.c_str(), "wb");
+ output = file_util::OpenFile(out_path, "wb");
if (!output) {
std::cerr << "Error: Could not open output "
- << out_path << std::endl;
+ << out_path.value() << std::endl;
return 1;
}
}