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

Unified Diff: webkit/plugins/npapi/plugin_stream.cc

Issue 14680012: Clean up ifdef around FilePath creation(webkit) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@filepath2
Patch Set: Created 7 years, 7 months 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/plugins/npapi/plugin_stream.cc
diff --git a/webkit/plugins/npapi/plugin_stream.cc b/webkit/plugins/npapi/plugin_stream.cc
index 1769b68609573b7c608fb2a0b9c50abd1cecbc20..44fc2247b4e4683dc1bacaf7d22d6a66503a4c29 100644
--- a/webkit/plugins/npapi/plugin_stream.cc
+++ b/webkit/plugins/npapi/plugin_stream.cc
@@ -83,11 +83,7 @@ bool PluginStream::Open(const std::string& mime_type,
} else {
GURL gurl(stream_.url);
-#if defined(OS_WIN)
- base::FilePath path(UTF8ToWide(gurl.path()));
-#elif defined(OS_POSIX)
- base::FilePath path(gurl.path());
-#endif
+ base::FilePath path = base::FilePath::FromUTF8Unsafe(gurl.path());
if (net::GetMimeTypeFromFile(path, &temp_mime_type))
Bernhard Bauer 2013/05/16 06:48:05 I think MimeUtil::GetMimeTypeFromExtensionHelper()
mrunal 2013/05/17 00:16:00 I don't think it will call SysWideToNativeMB for W
Bernhard Bauer 2013/05/17 07:04:44 Oh, right! But what about Linux then? Basically,
mrunal 2013/05/20 23:48:06 Specifically what do you want me to change? Are yo
Bernhard Bauer 2013/05/21 17:31:01 No, only for defined(OS_POSIX) && !(defined(OS_MAC
mrunal 2013/05/22 01:55:39 Hi Bernhard, Thanks for the clarification. I will
char_mime_type = temp_mime_type.c_str();
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698