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

Unified Diff: content/renderer/renderer_webkitplatformsupport_impl.cc

Issue 16927005: Use {As,From}UTF16Unsafe instead of file_path_string_conversions.{h,cc}. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 6 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 | « content/renderer/render_view_impl.cc ('k') | content/shell/renderer/webkit_test_runner.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/renderer_webkitplatformsupport_impl.cc
diff --git a/content/renderer/renderer_webkitplatformsupport_impl.cc b/content/renderer/renderer_webkitplatformsupport_impl.cc
index 88888679fe669cd47f3fea6a5c85e07ff47b96ab..23e5eb44aac072a0da5786729070ec98af6d1d58 100644
--- a/content/renderer/renderer_webkitplatformsupport_impl.cc
+++ b/content/renderer/renderer_webkitplatformsupport_impl.cc
@@ -55,7 +55,6 @@
#include "third_party/WebKit/public/platform/WebMediaStreamCenterClient.h"
#include "third_party/WebKit/public/platform/WebURL.h"
#include "third_party/WebKit/public/platform/WebVector.h"
-#include "webkit/base/file_path_string_conversions.h"
#include "webkit/common/gpu/webgraphicscontext3d_provider_impl.h"
#include "webkit/glue/simple_webmimeregistry_impl.h"
#include "webkit/glue/webfileutilities_impl.h"
@@ -483,7 +482,7 @@ RendererWebKitPlatformSupportImpl::MimeRegistry::mimeTypeForExtension(
std::string mime_type;
RenderThread::Get()->Send(
new MimeRegistryMsg_GetMimeTypeFromExtension(
- webkit_base::WebStringToFilePathString(file_extension), &mime_type));
+ base::FilePath::FromUTF16Unsafe(file_extension).value(), &mime_type));
return ASCIIToUTF16(mime_type);
}
@@ -496,7 +495,7 @@ WebString RendererWebKitPlatformSupportImpl::MimeRegistry::mimeTypeFromFile(
// these calls over to the browser process.
std::string mime_type;
RenderThread::Get()->Send(new MimeRegistryMsg_GetMimeTypeFromFile(
- base::FilePath(webkit_base::WebStringToFilePathString(file_path)),
+ base::FilePath::FromUTF16Unsafe(file_path),
&mime_type));
return ASCIIToUTF16(mime_type);
}
@@ -513,7 +512,7 @@ RendererWebKitPlatformSupportImpl::MimeRegistry::preferredExtensionForMIMEType(
RenderThread::Get()->Send(
new MimeRegistryMsg_GetPreferredExtensionForMimeType(
UTF16ToASCII(mime_type), &file_extension));
- return webkit_base::FilePathStringToWebString(file_extension);
+ return base::FilePath(file_extension).AsUTF16Unsafe();
}
//------------------------------------------------------------------------------
@@ -524,7 +523,7 @@ bool RendererWebKitPlatformSupportImpl::FileUtilities::getFileInfo(
base::PlatformFileInfo file_info;
base::PlatformFileError status;
if (!SendSyncMessageFromAnyThread(new FileUtilitiesMsg_GetFileInfo(
- webkit_base::WebStringToFilePath(path), &file_info, &status)) ||
+ base::FilePath::FromUTF16Unsafe(path), &file_info, &status)) ||
status != base::PLATFORM_FILE_OK) {
return false;
}
@@ -538,7 +537,7 @@ base::PlatformFile RendererWebKitPlatformSupportImpl::FileUtilities::openFile(
int mode) {
IPC::PlatformFileForTransit handle = IPC::InvalidPlatformFileForTransit();
SendSyncMessageFromAnyThread(new FileUtilitiesMsg_OpenFile(
- webkit_base::WebStringToFilePath(path), mode, &handle));
+ base::FilePath::FromUTF16Unsafe(path), mode, &handle));
return IPC::PlatformFileForTransitToPlatformFile(handle);
}
« no previous file with comments | « content/renderer/render_view_impl.cc ('k') | content/shell/renderer/webkit_test_runner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698