diff options
author | darin@google.com <darin@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-07-31 19:40:37 +0000 |
---|---|---|
committer | darin@google.com <darin@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-07-31 19:40:37 +0000 |
commit | 8ac1a75acadaa2aae065212cb6255d00c789a184 (patch) | |
tree | 854eaf66ba8ce7e581bd8e6f1fa75f46d22f4bb7 /webkit | |
parent | 287a019ed5d015185cab41f6c7156dc6c4cbcee7 (diff) | |
download | chromium_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')
-rw-r--r-- | webkit/glue/dom_operations_unittest.cc | 6 | ||||
-rw-r--r-- | webkit/glue/dom_serializer_unittest.cc | 20 | ||||
-rw-r--r-- | webkit/glue/multipart_response_delegate.cc | 8 | ||||
-rw-r--r-- | webkit/glue/resource_handle_win.cc | 5 | ||||
-rw-r--r-- | webkit/tools/test_shell/plugin_tests.cc | 4 | ||||
-rw-r--r-- | webkit/tools/test_shell/test_shell_main.cc | 4 | ||||
-rw-r--r-- | webkit/tools/test_shell/test_shell_request_context.cc | 2 |
7 files changed, 23 insertions, 26 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. diff --git a/webkit/tools/test_shell/plugin_tests.cc b/webkit/tools/test_shell/plugin_tests.cc index bfde855..7f5be5f 100644 --- a/webkit/tools/test_shell/plugin_tests.cc +++ b/webkit/tools/test_shell/plugin_tests.cc @@ -54,7 +54,7 @@ class PluginTest : public TestShellTest { class RequestContext : public TestURLRequestContext { public: RequestContext() { - cookie_store_ = new CookieMonster(); + cookie_store_ = new net::CookieMonster(); } virtual ~RequestContext() { @@ -68,7 +68,7 @@ class PluginTest : public TestShellTest { void NavigateToURL(const std::wstring& test_url) { ASSERT_TRUE(file_util::PathExists(test_url)); - test_url_ = net_util::FilePathToFileURL(test_url); + test_url_ = net::FilePathToFileURL(test_url); test_shell_->LoadURL(test_url.c_str()); } diff --git a/webkit/tools/test_shell/test_shell_main.cc b/webkit/tools/test_shell/test_shell_main.cc index 0256fed..468ec36 100644 --- a/webkit/tools/test_shell/test_shell_main.cc +++ b/webkit/tools/test_shell/test_shell_main.cc @@ -174,7 +174,7 @@ int main(int argc, char* argv[]) if (layout_test_mode || parsed_command_line.HasSwitch(test_shell::kEnableFileCookies)) - CookieMonster::EnableFileScheme(); + net::CookieMonster::EnableFileScheme(); std::wstring cache_path = parsed_command_line.GetSwitchValue(test_shell::kCacheDir); @@ -192,7 +192,7 @@ int main(int argc, char* argv[]) icu_util::Initialize(); // Config the network module so it has access to a limited set of resources. - NetModule::SetResourceProvider(NetResourceProvider); + net::NetModule::SetResourceProvider(NetResourceProvider); INITCOMMONCONTROLSEX InitCtrlEx; diff --git a/webkit/tools/test_shell/test_shell_request_context.cc b/webkit/tools/test_shell/test_shell_request_context.cc index 0406e01..16282f2 100644 --- a/webkit/tools/test_shell/test_shell_request_context.cc +++ b/webkit/tools/test_shell/test_shell_request_context.cc @@ -45,7 +45,7 @@ TestShellRequestContext::TestShellRequestContext( void TestShellRequestContext::Init( const std::wstring& cache_path, net::HttpCache::Mode cache_mode) { - cookie_store_ = new CookieMonster(); + cookie_store_ = new net::CookieMonster(); user_agent_ = webkit_glue::GetDefaultUserAgent(); |