summaryrefslogtreecommitdiffstats
path: root/webkit/glue
diff options
context:
space:
mode:
authorhashimoto@chromium.org <hashimoto@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-23 04:36:34 +0000
committerhashimoto@chromium.org <hashimoto@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-23 04:36:34 +0000
commitbb0e79474b4a2a50643901aae666a9e67ae9da8d (patch)
treee28e0c8988f303e44024df880d8735ac4a895e87 /webkit/glue
parenta0100c9d99acc92d6801f8d113873898e004e4d9 (diff)
downloadchromium_src-bb0e79474b4a2a50643901aae666a9e67ae9da8d.zip
chromium_src-bb0e79474b4a2a50643901aae666a9e67ae9da8d.tar.gz
chromium_src-bb0e79474b4a2a50643901aae666a9e67ae9da8d.tar.bz2
webkit: Move FilePath/WebString conversion functions from 'glue' to 'base'
Add new files file_path_string_conversions.h/cc. 'dom_storage' no longer depends on 'glue' Function declarations of RemoveForDataFromHistoryState(), RemovePasswordDataFromHistoryState(), RemoveScrollOffsetFromHistoryState(), CreateHistoryStateForURL() are moved from webkit_glue.h to glue_serialize.h. (This move is needed to export these functions without including webkit_glue.h from glue_serialize.cc) BUG=157095 TEST=build Review URL: https://chromiumcodereview.appspot.com/11232035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@163505 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue')
-rw-r--r--webkit/glue/dom_serializer_unittest.cc6
-rw-r--r--webkit/glue/glue_serialize.cc111
-rw-r--r--webkit/glue/glue_serialize.h20
-rw-r--r--webkit/glue/glue_serialize_unittest.cc6
-rw-r--r--webkit/glue/simple_webmimeregistry_impl.cc12
-rw-r--r--webkit/glue/webfileutilities_impl.cc32
-rw-r--r--webkit/glue/webkit_glue.cc30
-rw-r--r--webkit/glue/webkit_glue.h30
-rw-r--r--webkit/glue/webkitplatformsupport_impl.cc4
-rw-r--r--webkit/glue/weburlloader_impl.cc9
10 files changed, 112 insertions, 148 deletions
diff --git a/webkit/glue/dom_serializer_unittest.cc b/webkit/glue/dom_serializer_unittest.cc
index c036e63..dcce6c3 100644
--- a/webkit/glue/dom_serializer_unittest.cc
+++ b/webkit/glue/dom_serializer_unittest.cc
@@ -24,8 +24,8 @@
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURL.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebVector.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
+#include "webkit/base/file_path_string_conversions.h"
#include "webkit/glue/dom_operations.h"
-#include "webkit/glue/webkit_glue.h"
#include "webkit/tools/test_shell/simple_resource_loader_bridge.h"
#include "webkit/tools/test_shell/test_shell_test.h"
@@ -175,7 +175,7 @@ class DomSerializerTests : public TestShellTest,
// Add input file URl to links_.
links_.assign(&page_url,1);
// Add dummy file path to local_path_.
- WebString file_path = webkit_glue::FilePathStringToWebString(
+ WebString file_path = webkit_base::FilePathStringToWebString(
FILE_PATH_LITERAL("c:\\dummy.htm"));
local_paths_.assign(&file_path, 1);
// Start serializing DOM.
@@ -184,7 +184,7 @@ class DomSerializerTests : public TestShellTest,
static_cast<WebPageSerializerClient*>(this),
links_,
local_paths_,
- webkit_glue::FilePathToWebString(local_directory_name_));
+ webkit_base::FilePathToWebString(local_directory_name_));
ASSERT_TRUE(result);
ASSERT_TRUE(serialized_);
}
diff --git a/webkit/glue/glue_serialize.cc b/webkit/glue/glue_serialize.cc
index 9993b1a..c742952 100644
--- a/webkit/glue/glue_serialize.cc
+++ b/webkit/glue/glue_serialize.cc
@@ -17,7 +17,7 @@
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURL.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebVector.h"
-#include "webkit/glue/webkit_glue.h"
+#include "webkit/base/file_path_string_conversions.h"
using WebKit::WebData;
using WebKit::WebHistoryItem;
@@ -492,8 +492,63 @@ WebHistoryItem HistoryItemFromString(
static_cast<int>(serialized_item.length()));
return ReadHistoryItem(&obj, include_form_data, include_scroll_offset);
}
+
} // namespace
+// Serialize a HistoryItem to a string, using our JSON Value serializer.
+std::string HistoryItemToString(const WebHistoryItem& item) {
+ if (item.isNull())
+ return std::string();
+
+ SerializeObject obj;
+ WriteHistoryItem(item, &obj);
+ return obj.GetAsString();
+}
+
+WebHistoryItem HistoryItemFromString(const std::string& serialized_item) {
+ return HistoryItemFromString(serialized_item, ALWAYS_INCLUDE_FORM_DATA, true);
+}
+
+std::vector<FilePath> FilePathsFromHistoryState(
+ const std::string& content_state) {
+ std::vector<FilePath> to_return;
+ // TODO(darin): We should avoid using the WebKit API here, so that we do not
+ // need to have WebKit initialized before calling this method.
+ const WebHistoryItem& item =
+ HistoryItemFromString(content_state, ALWAYS_INCLUDE_FORM_DATA, true);
+ if (item.isNull()) {
+ // Couldn't parse the string.
+ return to_return;
+ }
+ const WebVector<WebString> file_paths = item.getReferencedFilePaths();
+ for (size_t i = 0; i < file_paths.size(); ++i)
+ to_return.push_back(webkit_base::WebStringToFilePath(file_paths[i]));
+ return to_return;
+}
+
+// For testing purposes only.
+void HistoryItemToVersionedString(const WebHistoryItem& item, int version,
+ std::string* serialized_item) {
+ if (item.isNull()) {
+ serialized_item->clear();
+ return;
+ }
+
+ // Temporarily change the version.
+ int real_version = kVersion;
+ kVersion = version;
+
+ SerializeObject obj;
+ WriteHistoryItem(item, &obj);
+ *serialized_item = obj.GetAsString();
+
+ kVersion = real_version;
+}
+
+int HistoryItemCurrentVersion() {
+ return kVersion;
+}
+
std::string RemoveFormDataFromHistoryState(const std::string& content_state) {
// TODO(darin): We should avoid using the WebKit API here, so that we do not
// need to have WebKit initialized before calling this method.
@@ -548,58 +603,4 @@ std::string CreateHistoryStateForURL(const GURL& url) {
return obj.GetAsString();
}
-// Serialize a HistoryItem to a string, using our JSON Value serializer.
-std::string HistoryItemToString(const WebHistoryItem& item) {
- if (item.isNull())
- return std::string();
-
- SerializeObject obj;
- WriteHistoryItem(item, &obj);
- return obj.GetAsString();
-}
-
-WebHistoryItem HistoryItemFromString(const std::string& serialized_item) {
- return HistoryItemFromString(serialized_item, ALWAYS_INCLUDE_FORM_DATA, true);
-}
-
-std::vector<FilePath> FilePathsFromHistoryState(
- const std::string& content_state) {
- std::vector<FilePath> to_return;
- // TODO(darin): We should avoid using the WebKit API here, so that we do not
- // need to have WebKit initialized before calling this method.
- const WebHistoryItem& item =
- HistoryItemFromString(content_state, ALWAYS_INCLUDE_FORM_DATA, true);
- if (item.isNull()) {
- // Couldn't parse the string.
- return to_return;
- }
- const WebVector<WebString> file_paths = item.getReferencedFilePaths();
- for (size_t i = 0; i < file_paths.size(); ++i)
- to_return.push_back(WebStringToFilePath(file_paths[i]));
- return to_return;
-}
-
-// For testing purposes only.
-void HistoryItemToVersionedString(const WebHistoryItem& item, int version,
- std::string* serialized_item) {
- if (item.isNull()) {
- serialized_item->clear();
- return;
- }
-
- // Temporarily change the version.
- int real_version = kVersion;
- kVersion = version;
-
- SerializeObject obj;
- WriteHistoryItem(item, &obj);
- *serialized_item = obj.GetAsString();
-
- kVersion = real_version;
-}
-
-int HistoryItemCurrentVersion() {
- return kVersion;
-}
-
} // namespace webkit_glue
diff --git a/webkit/glue/glue_serialize.h b/webkit/glue/glue_serialize.h
index e1e8259..ac869a9 100644
--- a/webkit/glue/glue_serialize.h
+++ b/webkit/glue/glue_serialize.h
@@ -16,6 +16,8 @@
#include "third_party/WebKit/Source/WebKit/chromium/public/WebHistoryItem.h"
#include "webkit/glue/webkit_glue_export.h"
+class GURL;
+
namespace webkit_glue {
// HistoryItem serialization.
@@ -36,6 +38,24 @@ WEBKIT_GLUE_EXPORT void HistoryItemToVersionedString(
std::string* serialized_item);
WEBKIT_GLUE_EXPORT int HistoryItemCurrentVersion();
+// Removes any form data state from the history state string |content_state|.
+WEBKIT_GLUE_EXPORT std::string RemoveFormDataFromHistoryState(
+ const std::string& content_state);
+
+// Removes form data containing passwords from the history state string
+// |content_state|.
+WEBKIT_GLUE_EXPORT std::string RemovePasswordDataFromHistoryState(
+ const std::string& content_state);
+
+// Removes scroll offset from the history state string |content_state|.
+WEBKIT_GLUE_EXPORT std::string RemoveScrollOffsetFromHistoryState(
+ const std::string& content_state);
+
+// Creates serialized state for the specified URL. This is a variant of
+// HistoryItemToString (in glue_serialize) that is used during session restore
+// if the saved state is empty.
+WEBKIT_GLUE_EXPORT std::string CreateHistoryStateForURL(const GURL& url);
+
} // namespace webkit_glue
#endif // #ifndef WEBKIT_GLUE_GLUE_SERIALIZE_H_
diff --git a/webkit/glue/glue_serialize_unittest.cc b/webkit/glue/glue_serialize_unittest.cc
index 306a0f5..cb77a30 100644
--- a/webkit/glue/glue_serialize_unittest.cc
+++ b/webkit/glue/glue_serialize_unittest.cc
@@ -10,8 +10,8 @@
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebHTTPBody.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebPoint.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebVector.h"
+#include "webkit/base/file_path_string_conversions.h"
#include "webkit/glue/glue_serialize.h"
-#include "webkit/glue/webkit_glue.h"
#include "webkit/glue/web_io_operators.h"
using WebKit::WebData;
@@ -269,8 +269,8 @@ TEST_F(GlueSerializeTest, FilePathsFromHistoryState) {
FilePath file_path2(FILE_PATH_LITERAL("another_file"));
WebHTTPBody http_body;
http_body.initialize();
- http_body.appendFile(webkit_glue::FilePathToWebString(file_path1));
- http_body.appendFile(webkit_glue::FilePathToWebString(file_path2));
+ http_body.appendFile(webkit_base::FilePathToWebString(file_path1));
+ http_body.appendFile(webkit_base::FilePathToWebString(file_path2));
item.setHTTPBody(http_body);
std::string serialized_item = webkit_glue::HistoryItemToString(item);
diff --git a/webkit/glue/simple_webmimeregistry_impl.cc b/webkit/glue/simple_webmimeregistry_impl.cc
index bffc96f..73ba6f85 100644
--- a/webkit/glue/simple_webmimeregistry_impl.cc
+++ b/webkit/glue/simple_webmimeregistry_impl.cc
@@ -9,7 +9,7 @@
#include "base/utf_string_conversions.h"
#include "net/base/mime_util.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h"
-#include "webkit/glue/webkit_glue.h"
+#include "webkit/base/file_path_string_conversions.h"
#include "webkit/media/crypto/key_systems.h"
using WebKit::WebString;
@@ -115,8 +115,8 @@ WebMimeRegistry::SupportsType
WebString SimpleWebMimeRegistryImpl::mimeTypeForExtension(
const WebString& file_extension) {
std::string mime_type;
- net::GetMimeTypeFromExtension(WebStringToFilePathString(file_extension),
- &mime_type);
+ net::GetMimeTypeFromExtension(
+ webkit_base::WebStringToFilePathString(file_extension), &mime_type);
return ASCIIToUTF16(mime_type);
}
@@ -124,14 +124,14 @@ WebString SimpleWebMimeRegistryImpl::wellKnownMimeTypeForExtension(
const WebString& file_extension) {
std::string mime_type;
net::GetWellKnownMimeTypeFromExtension(
- WebStringToFilePathString(file_extension), &mime_type);
+ webkit_base::WebStringToFilePathString(file_extension), &mime_type);
return ASCIIToUTF16(mime_type);
}
WebString SimpleWebMimeRegistryImpl::mimeTypeFromFile(
const WebString& file_path) {
std::string mime_type;
- net::GetMimeTypeFromFile(FilePath(WebStringToFilePathString(file_path)),
+ net::GetMimeTypeFromFile(webkit_base::WebStringToFilePath(file_path),
&mime_type);
return ASCIIToUTF16(mime_type);
}
@@ -141,7 +141,7 @@ WebString SimpleWebMimeRegistryImpl::preferredExtensionForMIMEType(
FilePath::StringType file_extension;
net::GetPreferredExtensionForMimeType(ToASCIIOrEmpty(mime_type),
&file_extension);
- return FilePathStringToWebString(file_extension);
+ return webkit_base::FilePathStringToWebString(file_extension);
}
} // namespace webkit_glue
diff --git a/webkit/glue/webfileutilities_impl.cc b/webkit/glue/webfileutilities_impl.cc
index 56b5944..835c37e 100644
--- a/webkit/glue/webfileutilities_impl.cc
+++ b/webkit/glue/webfileutilities_impl.cc
@@ -12,6 +12,7 @@
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFileInfo.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURL.h"
+#include "webkit/base/file_path_string_conversions.h"
#include "webkit/glue/webkit_glue.h"
using WebKit::WebString;
@@ -26,8 +27,8 @@ WebFileUtilitiesImpl::~WebFileUtilitiesImpl() {
}
bool WebFileUtilitiesImpl::fileExists(const WebString& path) {
- FilePath::StringType file_path = WebStringToFilePathString(path);
- return file_util::PathExists(FilePath(file_path));
+ FilePath file_path = webkit_base::WebStringToFilePath(path);
+ return file_util::PathExists(file_path);
}
bool WebFileUtilitiesImpl::deleteFile(const WebString& path) {
@@ -47,7 +48,8 @@ bool WebFileUtilitiesImpl::getFileInfo(const WebString& path,
return false;
}
base::PlatformFileInfo file_info;
- if (!file_util::GetFileInfo(WebStringToFilePath(path), &file_info))
+ if (!file_util::GetFileInfo(webkit_base::WebStringToFilePath(path),
+ &file_info))
return false;
webkit_glue::PlatformFileInfoToWebFileInfo(file_info, &web_file_info);
@@ -56,38 +58,38 @@ bool WebFileUtilitiesImpl::getFileInfo(const WebString& path,
}
WebString WebFileUtilitiesImpl::directoryName(const WebString& path) {
- FilePath file_path(WebStringToFilePathString(path));
- return FilePathToWebString(file_path.DirName());
+ FilePath file_path(webkit_base::WebStringToFilePath(path));
+ return webkit_base::FilePathToWebString(file_path.DirName());
}
WebString WebFileUtilitiesImpl::pathByAppendingComponent(
const WebString& webkit_path,
const WebString& webkit_component) {
- FilePath path(WebStringToFilePathString(webkit_path));
- FilePath component(WebStringToFilePathString(webkit_component));
+ FilePath path(webkit_base::WebStringToFilePath(webkit_path));
+ FilePath component(webkit_base::WebStringToFilePath(webkit_component));
FilePath combined_path = path.Append(component);
- return FilePathStringToWebString(combined_path.value());
+ return webkit_base::FilePathStringToWebString(combined_path.value());
}
bool WebFileUtilitiesImpl::makeAllDirectories(const WebString& path) {
DCHECK(!sandbox_enabled_);
- FilePath::StringType file_path = WebStringToFilePathString(path);
- return file_util::CreateDirectory(FilePath(file_path));
+ FilePath file_path = webkit_base::WebStringToFilePath(path);
+ return file_util::CreateDirectory(file_path);
}
WebString WebFileUtilitiesImpl::getAbsolutePath(const WebString& path) {
- FilePath file_path(WebStringToFilePathString(path));
+ FilePath file_path(webkit_base::WebStringToFilePath(path));
file_util::AbsolutePath(&file_path);
- return FilePathStringToWebString(file_path.value());
+ return webkit_base::FilePathStringToWebString(file_path.value());
}
bool WebFileUtilitiesImpl::isDirectory(const WebString& path) {
- FilePath file_path(WebStringToFilePathString(path));
+ FilePath file_path(webkit_base::WebStringToFilePath(path));
return file_util::DirectoryExists(file_path);
}
WebKit::WebURL WebFileUtilitiesImpl::filePathToURL(const WebString& path) {
- return net::FilePathToFileURL(WebStringToFilePath(path));
+ return net::FilePathToFileURL(webkit_base::WebStringToFilePath(path));
}
base::PlatformFile WebFileUtilitiesImpl::openFile(const WebString& path,
@@ -97,7 +99,7 @@ base::PlatformFile WebFileUtilitiesImpl::openFile(const WebString& path,
return base::kInvalidPlatformFileValue;
}
return base::CreatePlatformFile(
- WebStringToFilePath(path),
+ webkit_base::WebStringToFilePath(path),
(mode == 0) ? (base::PLATFORM_FILE_OPEN | base::PLATFORM_FILE_READ)
: (base::PLATFORM_FILE_CREATE_ALWAYS |
base::PLATFORM_FILE_WRITE),
diff --git a/webkit/glue/webkit_glue.cc b/webkit/glue/webkit_glue.cc
index cd14f45..6dcca02 100644
--- a/webkit/glue/webkit_glue.cc
+++ b/webkit/glue/webkit_glue.cc
@@ -21,7 +21,6 @@
#include "base/string_util.h"
#include "base/stringprintf.h"
#include "base/sys_info.h"
-#include "base/sys_string_conversions.h"
#include "base/utf_string_conversions.h"
#include "net/base/escape.h"
#include "net/url_request/url_request.h"
@@ -273,35 +272,6 @@ bool DecodeImage(const std::string& image_data, SkBitmap* image) {
return true;
}
-// NOTE: This pair of conversion functions are here instead of in glue_util.cc
-// since that file will eventually die. This pair of functions will need to
-// remain as the concept of a file-path specific character encoding string type
-// will most likely not make its way into WebKit.
-
-FilePath::StringType WebStringToFilePathString(const WebString& str) {
-#if defined(OS_POSIX)
- return base::SysWideToNativeMB(UTF16ToWideHack(str));
-#elif defined(OS_WIN)
- return UTF16ToWideHack(str);
-#endif
-}
-
-WebString FilePathStringToWebString(const FilePath::StringType& str) {
-#if defined(OS_POSIX)
- return WideToUTF16Hack(base::SysNativeMBToWide(str));
-#elif defined(OS_WIN)
- return WideToUTF16Hack(str);
-#endif
-}
-
-FilePath WebStringToFilePath(const WebString& str) {
- return FilePath(WebStringToFilePathString(str));
-}
-
-WebString FilePathToWebString(const FilePath& file_path) {
- return FilePathStringToWebString(file_path.value());
-}
-
void PlatformFileInfoToWebFileInfo(
const base::PlatformFileInfo& file_info,
WebKit::WebFileInfo* web_file_info) {
diff --git a/webkit/glue/webkit_glue.h b/webkit/glue/webkit_glue.h
index b7f9035..c166c72 100644
--- a/webkit/glue/webkit_glue.h
+++ b/webkit/glue/webkit_glue.h
@@ -14,14 +14,12 @@
#include <string>
#include <vector>
-#include "base/file_path.h"
#include "base/platform_file.h"
#include "base/string16.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebCanvas.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebReferrerPolicy.h"
#include "webkit/glue/webkit_glue_export.h"
-class GURL;
class SkBitmap;
namespace net {
@@ -35,7 +33,6 @@ class PlatformCanvas;
namespace WebKit {
struct WebFileInfo;
class WebFrame;
-class WebString;
}
namespace webkit_glue {
@@ -76,24 +73,6 @@ WEBKIT_GLUE_EXPORT string16 DumpHistoryState(const std::string& history_state,
int indent,
bool is_current);
-// Creates serialized state for the specified URL. This is a variant of
-// HistoryItemToString (in glue_serialize) that is used during session restore
-// if the saved state is empty.
-WEBKIT_GLUE_EXPORT std::string CreateHistoryStateForURL(const GURL& url);
-
-// Removes any form data state from the history state string |content_state|.
-WEBKIT_GLUE_EXPORT std::string RemoveFormDataFromHistoryState(
- const std::string& content_state);
-
-// Removes form data containing passwords from the history state string
-// |content_state|.
-WEBKIT_GLUE_EXPORT std::string RemovePasswordDataFromHistoryState(
- const std::string& content_state);
-
-// Removes scroll offset from the history state string |content_state|.
-WEBKIT_GLUE_EXPORT std::string RemoveScrollOffsetFromHistoryState(
- const std::string& content_state);
-
#ifndef NDEBUG
// Checks various important objects to see if there are any in memory, and
// calls AppendToLog with any leaked objects. Designed to be called on
@@ -114,15 +93,6 @@ void SetForcefullyTerminatePluginProcess(bool value);
// instead of exiting cleanly.
WEBKIT_GLUE_EXPORT bool ShouldForcefullyTerminatePluginProcess();
-// File path string conversions.
-WEBKIT_GLUE_EXPORT FilePath::StringType WebStringToFilePathString(
- const WebKit::WebString& str);
-WEBKIT_GLUE_EXPORT WebKit::WebString FilePathStringToWebString(
- const FilePath::StringType& str);
-WEBKIT_GLUE_EXPORT FilePath WebStringToFilePath(const WebKit::WebString& str);
-WEBKIT_GLUE_EXPORT WebKit::WebString FilePathToWebString(
- const FilePath& file_path);
-
// File info conversion
WEBKIT_GLUE_EXPORT void PlatformFileInfoToWebFileInfo(
const base::PlatformFileInfo& file_info,
diff --git a/webkit/glue/webkitplatformsupport_impl.cc b/webkit/glue/webkitplatformsupport_impl.cc
index 6089dd1..547d830 100644
--- a/webkit/glue/webkitplatformsupport_impl.cc
+++ b/webkit/glue/webkitplatformsupport_impl.cc
@@ -40,8 +40,8 @@
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURL.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebVector.h"
#include "ui/base/layout.h"
+#include "webkit/base/file_path_string_conversions.h"
#include "webkit/compositor_bindings/web_compositor_support_impl.h"
-#include "webkit/glue/webkit_glue.h"
#include "webkit/glue/websocketstreamhandle_impl.h"
#include "webkit/glue/webthread_impl.h"
#include "webkit/glue/weburlloader_impl.h"
@@ -307,7 +307,7 @@ void WebKitPlatformSupportImpl::getPluginList(bool refresh,
builder->addPlugin(
plugin.name, plugin.desc,
- FilePathStringToWebString(plugin.path.BaseName().value()));
+ webkit_base::FilePathStringToWebString(plugin.path.BaseName().value()));
for (size_t j = 0; j < plugin.mime_types.size(); ++j) {
const webkit::WebPluginMimeType& mime_type = plugin.mime_types[j];
diff --git a/webkit/glue/weburlloader_impl.cc b/webkit/glue/weburlloader_impl.cc
index 7606719..aed0318 100644
--- a/webkit/glue/weburlloader_impl.cc
+++ b/webkit/glue/weburlloader_impl.cc
@@ -29,11 +29,11 @@
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLLoaderClient.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLRequest.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLResponse.h"
+#include "webkit/base/file_path_string_conversions.h"
#include "webkit/glue/ftp_directory_listing_response_delegate.h"
#include "webkit/glue/multipart_response_delegate.h"
#include "webkit/glue/resource_loader_bridge.h"
#include "webkit/glue/resource_request_body.h"
-#include "webkit/glue/webkit_glue.h"
#include "webkit/glue/webkitplatformsupport_impl.h"
#include "webkit/glue/weburlrequest_extradata_impl.h"
#include "webkit/glue/weburlresponse_extradata_impl.h"
@@ -174,7 +174,8 @@ void PopulateURLResponse(
response->setRemotePort(info.socket_address.port());
response->setConnectionID(info.connection_id);
response->setConnectionReused(info.connection_reused);
- response->setDownloadFilePath(FilePathToWebString(info.download_file_path));
+ response->setDownloadFilePath(
+ webkit_base::FilePathToWebString(info.download_file_path));
response->setExtraData(new WebURLResponseExtraDataImpl(
info.npn_negotiated_protocol));
@@ -459,11 +460,11 @@ void WebURLLoaderImpl::Context::Start(
case WebHTTPBody::Element::TypeFile:
if (element.fileLength == -1) {
request_body->AppendFileRange(
- WebStringToFilePath(element.filePath),
+ webkit_base::WebStringToFilePath(element.filePath),
0, kuint64max, base::Time());
} else {
request_body->AppendFileRange(
- WebStringToFilePath(element.filePath),
+ webkit_base::WebStringToFilePath(element.filePath),
static_cast<uint64>(element.fileStart),
static_cast<uint64>(element.fileLength),
base::Time::FromDoubleT(element.modificationTime));