summaryrefslogtreecommitdiffstats
path: root/webkit/glue
diff options
context:
space:
mode:
authordarin@google.com <darin@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-07-31 19:40:37 +0000
committerdarin@google.com <darin@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-07-31 19:40:37 +0000
commit8ac1a75acadaa2aae065212cb6255d00c789a184 (patch)
tree854eaf66ba8ce7e581bd8e6f1fa75f46d22f4bb7 /webkit/glue
parent287a019ed5d015185cab41f6c7156dc6c4cbcee7 (diff)
downloadchromium_src-8ac1a75acadaa2aae065212cb6255d00c789a184.zip
chromium_src-8ac1a75acadaa2aae065212cb6255d00c789a184.tar.gz
chromium_src-8ac1a75acadaa2aae065212cb6255d00c789a184.tar.bz2
Move more net classes into the net namespace. Also remove the net_util namespace in favor of the net namespace.
This is a purely mechanical change. There should be no logic changes. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@192 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue')
-rw-r--r--webkit/glue/dom_operations_unittest.cc6
-rw-r--r--webkit/glue/dom_serializer_unittest.cc20
-rw-r--r--webkit/glue/multipart_response_delegate.cc8
-rw-r--r--webkit/glue/resource_handle_win.cc5
4 files changed, 18 insertions, 21 deletions
diff --git a/webkit/glue/dom_operations_unittest.cc b/webkit/glue/dom_operations_unittest.cc
index 3865ea7..72b25df 100644
--- a/webkit/glue/dom_operations_unittest.cc
+++ b/webkit/glue/dom_operations_unittest.cc
@@ -66,7 +66,7 @@ void DomOperationsTests::GetSavableResourceLinksForPage(
const std::wstring& page_file_path,
const std::set<GURL>& expected_resources_set) {
// Convert local file path to file URL.
- GURL file_url = net_util::FilePathToFileURL(page_file_path);
+ GURL file_url = net::FilePathToFileURL(page_file_path);
// Load the test file.
test_shell_->ResetTestController();
std::wstring file_wurl = ASCIIToWide(file_url.spec());
@@ -122,7 +122,7 @@ TEST_F(DomOperationsTests, GetSavableResourceLinksWithPageHasValidLinks) {
std::wstring expected_frame_url = page_file_path;
file_util::AppendToPath(&expected_frame_url, expected_frame_links[i]);
expected_resources_set.insert(
- net_util::FilePathToFileURL(expected_frame_url));
+ net::FilePathToFileURL(expected_frame_url));
}
file_util::AppendToPath(&page_file_path, std::wstring(L"youtube_1.htm"));
@@ -145,7 +145,7 @@ TEST_F(DomOperationsTests, GetSavableResourceLinksWithPageHasInvalidLinks) {
std::wstring expected_frame_url = page_file_path;
file_util::AppendToPath(&expected_frame_url, expected_frame_links[i]);
expected_resources_set.insert(
- net_util::FilePathToFileURL(expected_frame_url));
+ net::FilePathToFileURL(expected_frame_url));
}
file_util::AppendToPath(&page_file_path, std::wstring(L"youtube_2.htm"));
diff --git a/webkit/glue/dom_serializer_unittest.cc b/webkit/glue/dom_serializer_unittest.cc
index afc4db0..b649032 100644
--- a/webkit/glue/dom_serializer_unittest.cc
+++ b/webkit/glue/dom_serializer_unittest.cc
@@ -263,7 +263,7 @@ bool IsMetaElement(const WebCore::Node* node, WebCore::String* charset_info) {
TEST_F(DomSerializerTests, SerialzeHTMLDOMWithDocType) {
std::wstring page_file_path = data_dir_;
file_util::AppendToPath(&page_file_path, L"dom_serializer/youtube_1.htm");
- GURL file_url = net_util::FilePathToFileURL(page_file_path);
+ GURL file_url = net::FilePathToFileURL(page_file_path);
ASSERT_TRUE(file_url.SchemeIsFile());
std::wstring page_url = ASCIIToWide(file_url.spec());
// Load the test file.
@@ -295,7 +295,7 @@ TEST_F(DomSerializerTests, SerialzeHTMLDOMWithDocType) {
TEST_F(DomSerializerTests, SerialzeHTMLDOMWithoutDocType) {
std::wstring page_file_path = data_dir_;
file_util::AppendToPath(&page_file_path, L"dom_serializer/youtube_2.htm");
- GURL file_url = net_util::FilePathToFileURL(page_file_path);
+ GURL file_url = net::FilePathToFileURL(page_file_path);
ASSERT_TRUE(file_url.SchemeIsFile());
std::wstring page_url = ASCIIToWide(file_url.spec());
// Load the test file.
@@ -332,7 +332,7 @@ TEST_F(DomSerializerTests, SerialzeXMLDocWithBuiltInEntities) {
std::string orginal_contents;
ASSERT_TRUE(file_util::ReadFileToString(page_file_path, &orginal_contents));
// Get file URL.
- GURL file_url = net_util::FilePathToFileURL(page_file_path);
+ GURL file_url = net::FilePathToFileURL(page_file_path);
ASSERT_TRUE(file_url.SchemeIsFile());
std::wstring page_url = ASCIIToWide(file_url.spec());
// Load the test file.
@@ -354,7 +354,7 @@ TEST_F(DomSerializerTests, SerialzeHTMLDOMWithAddingMOTW) {
std::string orginal_contents;
ASSERT_TRUE(file_util::ReadFileToString(page_file_path, &orginal_contents));
// Get file URL.
- GURL file_url = net_util::FilePathToFileURL(page_file_path);
+ GURL file_url = net::FilePathToFileURL(page_file_path);
ASSERT_TRUE(file_url.SchemeIsFile());
std::wstring page_url = ASCIIToWide(file_url.spec());
// Make sure original contents does not have MOTW;
@@ -385,7 +385,7 @@ TEST_F(DomSerializerTests, SerialzeHTMLDOMWithNoMetaCharsetInOriginalDoc) {
std::wstring page_file_path = data_dir_;
file_util::AppendToPath(&page_file_path, L"dom_serializer/youtube_1.htm");
// Get file URL.
- GURL file_url = net_util::FilePathToFileURL(page_file_path);
+ GURL file_url = net::FilePathToFileURL(page_file_path);
ASSERT_TRUE(file_url.SchemeIsFile());
std::wstring page_url = ASCIIToWide(file_url.spec());
// Load the test file.
@@ -448,7 +448,7 @@ TEST_F(DomSerializerTests,
std::wstring page_file_path = data_dir_;
file_util::AppendToPath(&page_file_path, L"dom_serializer/youtube_2.htm");
// Get file URL.
- GURL file_url = net_util::FilePathToFileURL(page_file_path);
+ GURL file_url = net::FilePathToFileURL(page_file_path);
ASSERT_TRUE(file_url.SchemeIsFile());
std::wstring page_url = ASCIIToWide(file_url.spec());
// Load the test file.
@@ -516,7 +516,7 @@ TEST_F(DomSerializerTests, SerialzeHTMLDOMWithEntitiesInText) {
std::string orginal_contents;
ASSERT_TRUE(file_util::ReadFileToString(page_file_path, &orginal_contents));
// Get file URL.
- GURL file_url = net_util::FilePathToFileURL(page_file_path);
+ GURL file_url = net::FilePathToFileURL(page_file_path);
ASSERT_TRUE(file_url.SchemeIsFile());
std::wstring page_url = ASCIIToWide(file_url.spec());
// Load the test file.
@@ -557,7 +557,7 @@ TEST_F(DomSerializerTests, SerialzeHTMLDOMWithEntitiesInAttributeValue) {
std::string orginal_contents;
ASSERT_TRUE(file_util::ReadFileToString(page_file_path, &orginal_contents));
// Get file URL.
- GURL file_url = net_util::FilePathToFileURL(page_file_path);
+ GURL file_url = net::FilePathToFileURL(page_file_path);
ASSERT_TRUE(file_url.SchemeIsFile());
std::wstring page_url = ASCIIToWide(file_url.spec());
// Load the test file.
@@ -598,11 +598,11 @@ TEST_F(DomSerializerTests, SerialzeHTMLDOMWithBaseTag) {
std::wstring page_file_path = data_dir_;
file_util::AppendToPath(&page_file_path, L"dom_serializer\\");
// Get page dir URL which is base URL of this file.
- GURL path_dir_url = net_util::FilePathToFileURL(page_file_path);
+ GURL path_dir_url = net::FilePathToFileURL(page_file_path);
// Get file path.
file_util::AppendToPath(&page_file_path, L"html_doc_has_base_tag.htm");
// Get file URL.
- GURL file_url = net_util::FilePathToFileURL(page_file_path);
+ GURL file_url = net::FilePathToFileURL(page_file_path);
ASSERT_TRUE(file_url.SchemeIsFile());
std::wstring page_url = ASCIIToWide(file_url.spec());
// Load the test file.
diff --git a/webkit/glue/multipart_response_delegate.cc b/webkit/glue/multipart_response_delegate.cc
index e9cc258..c44f6b9 100644
--- a/webkit/glue/multipart_response_delegate.cc
+++ b/webkit/glue/multipart_response_delegate.cc
@@ -192,10 +192,8 @@ bool MultipartResponseDelegate::ParseHeaders() {
// Create a ResourceResponse based on the original set of headers + the
// replacement headers. We only replace the same few headers that gecko
// does. See netwerk/streamconv/converters/nsMultiMixedConv.cpp.
- std::string mime_type = net_util::GetSpecificHeader(headers,
- "content-type");
- std::string charset = net_util::GetHeaderParamValue(mime_type,
- "charset");
+ std::string mime_type = net::GetSpecificHeader(headers, "content-type");
+ std::string charset = net::GetHeaderParamValue(mime_type, "charset");
WebCore::ResourceResponse response(original_response_.url(),
webkit_glue::StdStringToString(mime_type.c_str()),
-1,
@@ -224,7 +222,7 @@ bool MultipartResponseDelegate::ParseHeaders() {
};
for (int i = 0; i < arraysize(replace_headers); ++i) {
std::string name(replace_headers[i]);
- std::string value = net_util::GetSpecificHeader(headers, name);
+ std::string value = net::GetSpecificHeader(headers, name);
if (!value.empty()) {
response.setHTTPHeaderField(webkit_glue::StdStringToString(name.c_str()),
webkit_glue::StdStringToString(value.c_str()));
diff --git a/webkit/glue/resource_handle_win.cc b/webkit/glue/resource_handle_win.cc
index f309274..f0c4940 100644
--- a/webkit/glue/resource_handle_win.cc
+++ b/webkit/glue/resource_handle_win.cc
@@ -165,7 +165,7 @@ static ResourceResponse MakeResourceResponse(
if (info.headers) {
std::string disp_val;
if (info.headers->EnumerateHeader(NULL, "content-disposition", &disp_val)) {
- suggested_filename = net_util::GetSuggestedFilename(
+ suggested_filename = net::GetSuggestedFilename(
webkit_glue::KURLToGURL(kurl), disp_val, std::wstring());
}
}
@@ -552,8 +552,7 @@ void ResourceHandleInternal::OnReceivedResponse(
std::string content_type;
info.headers->EnumerateHeader(NULL, "content-type", &content_type);
- std::string boundary = net_util::GetHeaderParamValue(content_type,
- "boundary");
+ std::string boundary = net::GetHeaderParamValue(content_type, "boundary");
TrimString(boundary, " \"", &boundary);
// If there's no boundary, just handle the request normally. In the gecko
// code, nsMultiMixedConv::OnStartRequest throws an exception.