diff options
Diffstat (limited to 'chrome')
61 files changed, 200 insertions, 195 deletions
diff --git a/chrome/browser/autocomplete/autocomplete.cc b/chrome/browser/autocomplete/autocomplete.cc index ecc3bbd..4153032 100644 --- a/chrome/browser/autocomplete/autocomplete.cc +++ b/chrome/browser/autocomplete/autocomplete.cc @@ -150,7 +150,7 @@ AutocompleteInput::Type AutocompleteInput::Parse(const std::wstring& text, // the host's validity at this point.) const std::wstring host(text.substr(parts->host.begin, parts->host.len)); const size_t registry_length = - RegistryControlledDomainService::GetRegistryLength(host, false); + net::RegistryControlledDomainService::GetRegistryLength(host, false); if (registry_length == std::wstring::npos) return QUERY; // It's not clear to me that we can reach this... @@ -169,7 +169,7 @@ AutocompleteInput::Type AutocompleteInput::Parse(const std::wstring& text, // See if the host is an IP address. bool is_ip_address; - net_util::CanonicalizeHost(host, &is_ip_address); + net::CanonicalizeHost(host, &is_ip_address); if (is_ip_address) { // If the user originally typed a host that looks like an IP address (a // dotted quad), they probably want to open it. If the original input was diff --git a/chrome/browser/automation/url_request_mock_http_job.cc b/chrome/browser/automation/url_request_mock_http_job.cc index 5df0ed7..0c3cbc7 100644 --- a/chrome/browser/automation/url_request_mock_http_job.cc +++ b/chrome/browser/automation/url_request_mock_http_job.cc @@ -59,7 +59,7 @@ URLRequestJob* URLRequestMockHTTPJob::Factory(URLRequest* request, // Convert the file:/// URL to a path on disk. std::wstring file_path; - net_util::FileURLToFilePath(GURL(file_url), &file_path); + net::FileURLToFilePath(GURL(file_url), &file_path); URLRequestMockHTTPJob* job = new URLRequestMockHTTPJob(request); job->file_path_ = file_path; return job; diff --git a/chrome/browser/automation/url_request_mock_net_error_job.cc b/chrome/browser/automation/url_request_mock_net_error_job.cc index 06adfb7..18ede31 100644 --- a/chrome/browser/automation/url_request_mock_net_error_job.cc +++ b/chrome/browser/automation/url_request_mock_net_error_job.cc @@ -43,7 +43,7 @@ URLRequestMockNetErrorJob::URLMockInfoMap void URLRequestMockNetErrorJob::AddMockedURL(const GURL& url, const std::wstring& base, const std::vector<int>& errors, - X509Certificate* ssl_cert) { + net::X509Certificate* ssl_cert) { #ifndef NDEBUG URLMockInfoMap::const_iterator iter = url_mock_info_map_.find(url); DCHECK(iter == url_mock_info_map_.end()); @@ -83,13 +83,13 @@ URLRequestJob* URLRequestMockNetErrorJob::Factory(URLRequest* request, file_url.append(UTF8ToWide(url.path())); // Convert the file:/// URL to a path on disk. std::wstring file_path; - net_util::FileURLToFilePath(GURL(file_url), &file_path); + net::FileURLToFilePath(GURL(file_url), &file_path); job->file_path_ = file_path; return job; } URLRequestMockNetErrorJob::URLRequestMockNetErrorJob(URLRequest* request, - const std::vector<int>& errors, X509Certificate* cert) + const std::vector<int>& errors, net::X509Certificate* cert) : URLRequestMockHTTPJob(request), errors_(errors), ssl_cert_(cert) { diff --git a/chrome/browser/automation/url_request_mock_net_error_job.h b/chrome/browser/automation/url_request_mock_net_error_job.h index bee1c31..d7abad0 100644 --- a/chrome/browser/automation/url_request_mock_net_error_job.h +++ b/chrome/browser/automation/url_request_mock_net_error_job.h @@ -41,7 +41,7 @@ class URLRequestMockNetErrorJob : public URLRequestMockHTTPJob { public: URLRequestMockNetErrorJob(URLRequest* request, const std::vector<int>& errors, - X509Certificate* ssl_cert); + net::X509Certificate* ssl_cert); virtual ~URLRequestMockNetErrorJob(); virtual void Start(); @@ -56,7 +56,7 @@ class URLRequestMockNetErrorJob : public URLRequestMockHTTPJob { static void AddMockedURL(const GURL& url, const std::wstring& base, const std::vector<int>& errors, - X509Certificate* ssl_cert); + net::X509Certificate* ssl_cert); // Removes the specified |url| from the list of mocked urls. static void RemoveMockedURL(const GURL& url); @@ -66,14 +66,14 @@ class URLRequestMockNetErrorJob : public URLRequestMockHTTPJob { MockInfo() : ssl_cert(NULL) { } MockInfo(std::wstring base, std::vector<int> errors, - X509Certificate* ssl_cert) + net::X509Certificate* ssl_cert) : base(base), errors(errors), ssl_cert(ssl_cert) { } std::wstring base; std::vector<int> errors; - scoped_refptr<X509Certificate> ssl_cert; + scoped_refptr<net::X509Certificate> ssl_cert; }; static URLRequest::ProtocolFactory Factory; @@ -84,7 +84,7 @@ class URLRequestMockNetErrorJob : public URLRequestMockHTTPJob { std::vector<int> errors_; // The certificate to use for SSL errors. - scoped_refptr<X509Certificate> ssl_cert_; + scoped_refptr<net::X509Certificate> ssl_cert_; typedef std::map<GURL, MockInfo> URLMockInfoMap; static URLMockInfoMap url_mock_info_map_; diff --git a/chrome/browser/back_forward_menu_model.cc b/chrome/browser/back_forward_menu_model.cc index 88b5345..6e59162 100644 --- a/chrome/browser/back_forward_menu_model.cc +++ b/chrome/browser/back_forward_menu_model.cc @@ -304,7 +304,7 @@ int BackForwardMenuModel::GetIndexOfNextChapterStop(int start_from, // When going backwards we return the first entry we find that has a // different domain. for (int i = start_from - 1; i >= 0; --i) { - if (!RegistryControlledDomainService::SameDomainOrHost(url, + if (!net::RegistryControlledDomainService::SameDomainOrHost(url, controller->GetEntryAtIndex(i)->GetURL())) return i; } @@ -314,7 +314,7 @@ int BackForwardMenuModel::GetIndexOfNextChapterStop(int start_from, // When going forwards we return the entry before the entry that has a // different domain. for (int i = start_from + 1; i < max_count; ++i) { - if (!RegistryControlledDomainService::SameDomainOrHost(url, + if (!net::RegistryControlledDomainService::SameDomainOrHost(url, controller->GetEntryAtIndex(i)->GetURL())) return i - 1; } diff --git a/chrome/browser/browser.cc b/chrome/browser/browser.cc index bc5ad30..fa76bd9 100644 --- a/chrome/browser/browser.cc +++ b/chrome/browser/browser.cc @@ -196,7 +196,7 @@ void Browser::RegisterUserPrefs(PrefService* prefs) { prefs->RegisterStringPref(prefs::kHomePage, L"chrome-internal:"); prefs->RegisterBooleanPref(prefs::kHomePageIsNewTabPage, true); prefs->RegisterIntegerPref(prefs::kCookieBehavior, - CookiePolicy::ALLOW_ALL_COOKIES); + net::CookiePolicy::ALLOW_ALL_COOKIES); prefs->RegisterBooleanPref(prefs::kShowHomeButton, false); prefs->RegisterStringPref(prefs::kRecentlySelectedEncoding, L""); } diff --git a/chrome/browser/browser_commands.cc b/chrome/browser/browser_commands.cc index fc54ae8..cdfc7a2 100644 --- a/chrome/browser/browser_commands.cc +++ b/chrome/browser/browser_commands.cc @@ -1115,7 +1115,7 @@ void Browser::DuplicateContentsAt(int index) { // Browser, SelectFileDialog::Listener implementation: void Browser::FileSelected(const std::wstring& path, void* params) { - GURL file_url = net_util::FilePathToFileURL(path); + GURL file_url = net::FilePathToFileURL(path); if (!file_url.is_empty()) OpenURL(file_url, CURRENT_TAB, PageTransition::TYPED); } diff --git a/chrome/browser/browser_init.cc b/chrome/browser/browser_init.cc index f718100..30e8cb5 100644 --- a/chrome/browser/browser_init.cc +++ b/chrome/browser/browser_init.cc @@ -427,7 +427,7 @@ bool BrowserInit::LaunchWithProfile::Launch(Profile* profile, } if (parsed_command_line.HasSwitch(switches::kEnableFileCookies)) - CookieMonster::EnableFileScheme(); + net::CookieMonster::EnableFileScheme(); #ifndef NDEBUG if (parsed_command_line.HasSwitch(switches::kApp)) { diff --git a/chrome/browser/browser_main.cc b/chrome/browser/browser_main.cc index 317ebed..057e254 100644 --- a/chrome/browser/browser_main.cc +++ b/chrome/browser/browser_main.cc @@ -423,7 +423,7 @@ int BrowserMain(CommandLine &parsed_command_line, int show_command, PrepareRestartOnCrashEnviroment(parsed_command_line); // Initialize Winsock. - WinsockInit init; + net::WinsockInit init; // Initialize the DNS prefetch system chrome_browser_net::DnsPrefetcherInit dns_prefetch_init(user_prefs); @@ -443,7 +443,7 @@ int BrowserMain(CommandLine &parsed_command_line, int show_command, RLZTracker::InitRlzDelayed(base::DIR_MODULE, is_first_run); // Config the network module so it has access to resources. - NetModule::SetResourceProvider(NetResourceProvider); + net::NetModule::SetResourceProvider(NetResourceProvider); // Register our global network handler for chrome-resource:// URLs. RegisterURLRequestChromeJob(); diff --git a/chrome/browser/browser_uitest.cc b/chrome/browser/browser_uitest.cc index 8213f8f..0739179 100644 --- a/chrome/browser/browser_uitest.cc +++ b/chrome/browser/browser_uitest.cc @@ -89,7 +89,7 @@ TEST_F(BrowserTest, NoTitle) { std::wstring test_file = test_data_directory_; file_util::AppendToPath(&test_file, L"title1.html"); - NavigateToURL(net_util::FilePathToFileURL(test_file)); + NavigateToURL(net::FilePathToFileURL(test_file)); Sleep(kWaitForActionMsec); // The browser lazily updates the title. EXPECT_EQ(WindowCaptionFromPageTitle(L"title1.html"), GetWindowTitle()); @@ -102,7 +102,7 @@ TEST_F(BrowserTest, Title) { std::wstring test_file = test_data_directory_; file_util::AppendToPath(&test_file, L"title2.html"); - NavigateToURL(net_util::FilePathToFileURL(test_file)); + NavigateToURL(net::FilePathToFileURL(test_file)); Sleep(kWaitForActionMsec); // The browser lazily updates the title. const std::wstring test_title(L"Title Of Awesomeness"); @@ -115,7 +115,7 @@ TEST_F(BrowserTest, WindowsSessionEnd) { std::wstring test_file = test_data_directory_; file_util::AppendToPath(&test_file, L"title1.html"); - NavigateToURL(net_util::FilePathToFileURL(test_file)); + NavigateToURL(net::FilePathToFileURL(test_file)); Sleep(kWaitForActionMsec); // Simulate an end of session. Normally this happens when the user @@ -209,8 +209,8 @@ TEST_F(BrowserTest, DuplicateTab) { std::wstring path_prefix = test_data_directory_; file_util::AppendToPath(&path_prefix, L"session_history"); path_prefix += file_util::kPathSeparator; - GURL url1 = net_util::FilePathToFileURL(path_prefix + L"bot1.html"); - GURL url2 = net_util::FilePathToFileURL(path_prefix + L"bot2.html"); + GURL url1 = net::FilePathToFileURL(path_prefix + L"bot1.html"); + GURL url2 = net::FilePathToFileURL(path_prefix + L"bot2.html"); GURL url3 = GURL("about:blank"); scoped_ptr<BrowserProxy> browser_proxy(automation()->GetBrowserWindow(0)); @@ -273,7 +273,7 @@ TEST_F(BrowserTest, NullOpenerRedirectForksProcess) { // Start with a file:// url file_util::AppendToPath(&test_file, L"title2.html"); - tab->NavigateToURL(net_util::FilePathToFileURL(test_file)); + tab->NavigateToURL(net::FilePathToFileURL(test_file)); int orig_tab_count = -1; ASSERT_TRUE(window->GetTabCount(&orig_tab_count)); int orig_process_count = GetBrowserProcessCount(); @@ -311,7 +311,7 @@ TEST_F(BrowserTest, OtherRedirectsDontForkProcess) { // Start with a file:// url file_util::AppendToPath(&test_file, L"title2.html"); - tab->NavigateToURL(net_util::FilePathToFileURL(test_file)); + tab->NavigateToURL(net::FilePathToFileURL(test_file)); int orig_tab_count = -1; ASSERT_TRUE(window->GetTabCount(&orig_tab_count)); int orig_process_count = GetBrowserProcessCount(); @@ -345,7 +345,7 @@ TEST_F(VisibleBrowserTest, WindowOpenClose) { std::wstring test_file(test_data_directory_); file_util::AppendToPath(&test_file, L"window.close.html"); - NavigateToURL(net_util::FilePathToFileURL(test_file)); + NavigateToURL(net::FilePathToFileURL(test_file)); int i; for (i = 0; i < 10; ++i) { diff --git a/chrome/browser/browsing_data_remover.cc b/chrome/browser/browsing_data_remover.cc index e45a374..15ccfb2 100644 --- a/chrome/browser/browsing_data_remover.cc +++ b/chrome/browser/browsing_data_remover.cc @@ -117,7 +117,7 @@ void BrowsingDataRemover::Remove(int remove_mask) { if (remove_mask & REMOVE_COOKIES) { UserMetrics::RecordAction(L"ClearBrowsingData_Cookies", profile_); - CookieMonster* cookie_monster = + net::CookieMonster* cookie_monster = profile_->GetRequestContext()->cookie_store(); cookie_monster->DeleteAllCreatedBetween(delete_begin_, delete_end_, true); } diff --git a/chrome/browser/cert_store.cc b/chrome/browser/cert_store.cc index 04e7c57..0afe65a 100644 --- a/chrome/browser/cert_store.cc +++ b/chrome/browser/cert_store.cc @@ -80,7 +80,7 @@ CertStore::~CertStore() { NOTIFY_RENDERER_PROCESS_TERMINATED, NotificationService::AllSources()); } -int CertStore::StoreCert(X509Certificate* cert, int process_id) { +int CertStore::StoreCert(net::X509Certificate* cert, int process_id) { DCHECK(cert); AutoLock autoLock(cert_lock_); @@ -117,7 +117,7 @@ int CertStore::StoreCert(X509Certificate* cert, int process_id) { } bool CertStore::RetrieveCert(int cert_id, - scoped_refptr<X509Certificate>* cert) { + scoped_refptr<net::X509Certificate>* cert) { AutoLock autoLock(cert_lock_); CertMap::iterator iter = id_to_cert_.find(cert_id); diff --git a/chrome/browser/cert_store.h b/chrome/browser/cert_store.h index 453f0b9..24b5f91 100644 --- a/chrome/browser/cert_store.h +++ b/chrome/browser/cert_store.h @@ -61,12 +61,12 @@ class CertStore : public NotificationObserver { // When all the RenderProcessHosts associated with a cert have exited, the // cert is removed from the store. // Note: ids starts at 1. - int StoreCert(X509Certificate* cert, int render_process_host_id); + int StoreCert(net::X509Certificate* cert, int render_process_host_id); // Retrieves the previously stored cert associated with the specified // |cert_id| and set it in |cert|. Returns false if no cert was found for // that id. - bool RetrieveCert(int cert_id, scoped_refptr<X509Certificate>* cert); + bool RetrieveCert(int cert_id, scoped_refptr<net::X509Certificate>* cert); // NotificationObserver implementation. virtual void Observe(NotificationType type, @@ -86,8 +86,8 @@ class CertStore : public NotificationObserver { static CertStore* instance_; typedef std::multimap<int, int> IDMap; - typedef std::map<int, scoped_refptr<X509Certificate>> CertMap; - typedef std::map<X509Certificate*, int, X509Certificate::LessThan> + typedef std::map<int, scoped_refptr<net::X509Certificate>> CertMap; + typedef std::map<net::X509Certificate*, int, net::X509Certificate::LessThan> ReverseCertMap; IDMap process_id_to_cert_id_; diff --git a/chrome/browser/crash_recovery_uitest.cc b/chrome/browser/crash_recovery_uitest.cc index db032a0..9468d38 100644 --- a/chrome/browser/crash_recovery_uitest.cc +++ b/chrome/browser/crash_recovery_uitest.cc @@ -77,7 +77,7 @@ TEST_F(CrashRecoveryUITest, LoadInNewTab) { // The title of the active tab should change each time this URL is loaded. std::wstring test_file = test_data_directory_; file_util::AppendToPath(&test_file, L"title2.html"); - GURL url(net_util::FilePathToFileURL(test_file)); + GURL url(net::FilePathToFileURL(test_file)); NavigateToURL(url); diff --git a/chrome/browser/download_manager.cc b/chrome/browser/download_manager.cc index 17851ac..a919ee33 100644 --- a/chrome/browser/download_manager.cc +++ b/chrome/browser/download_manager.cc @@ -908,9 +908,9 @@ void DownloadManager::GenerateExtension(const std::wstring& file_name, void DownloadManager::GenerateFilename(DownloadCreateInfo* info, std::wstring* generated_name) { std::wstring file_name = - net_util::GetSuggestedFilename(GURL(info->url), - info->content_disposition, - L"download"); + net::GetSuggestedFilename(GURL(info->url), + info->content_disposition, + L"download"); DCHECK(!file_name.empty()); // Make sure we get the right file extension. diff --git a/chrome/browser/google_util.cc b/chrome/browser/google_util.cc index d3d74f7..9a0beb7 100644 --- a/chrome/browser/google_util.cc +++ b/chrome/browser/google_util.cc @@ -63,8 +63,8 @@ GURL AppendGoogleLocaleParam(const GURL& url) { GURL AppendGoogleTLDParam(const GURL& url) { const std::string google_domain( - RegistryControlledDomainService::GetDomainAndRegistry( - GoogleURLTracker::GoogleURL())); + net::RegistryControlledDomainService::GetDomainAndRegistry( + GoogleURLTracker::GoogleURL())); const size_t first_dot = google_domain.find('.'); if (first_dot == std::string::npos) { NOTREACHED(); diff --git a/chrome/browser/history/redirect_uitest.cc b/chrome/browser/history/redirect_uitest.cc index 75fed14..0ee58f7 100644 --- a/chrome/browser/history/redirect_uitest.cc +++ b/chrome/browser/history/redirect_uitest.cc @@ -102,7 +102,7 @@ TEST_F(RedirectTest, ClientEmptyReferer) { GURL final_url = server.TestServerPageW(std::wstring()); std::wstring test_file = test_data_directory_; file_util::AppendToPath(&test_file, L"file_client_redirect.html"); - GURL first_url = net_util::FilePathToFileURL(test_file); + GURL first_url = net::FilePathToFileURL(test_file); NavigateToURL(first_url); std::vector<GURL> redirects; @@ -128,7 +128,7 @@ TEST_F(RedirectTest, ClientEmptyReferer) { TEST_F(RedirectTest, ClientCancelled) { std::wstring first_path = test_data_directory_; file_util::AppendToPath(&first_path, L"cancelled_redirect_test.html"); - GURL first_url = net_util::FilePathToFileURL(first_path); + GURL first_url = net::FilePathToFileURL(first_path); NavigateToURL(first_url); Sleep(kWaitForActionMsec); @@ -151,7 +151,7 @@ TEST_F(RedirectTest, ClientCancelled) { // %23, but in current_url the anchor will be '#'. std::string final_ref = "myanchor"; std::wstring current_path; - ASSERT_TRUE(net_util::FileURLToFilePath(current_url, ¤t_path)); + ASSERT_TRUE(net::FileURLToFilePath(current_url, ¤t_path)); // Path should remain unchanged. EXPECT_EQ(StringToLowerASCII(first_path), StringToLowerASCII(current_path)); EXPECT_EQ(final_ref, current_url.ref()); @@ -215,7 +215,7 @@ TEST_F(RedirectTest, NoHttpToFile) { TestServer server(kDocRoot); std::wstring test_file = test_data_directory_; file_util::AppendToPath(&test_file, L"http_to_file.html"); - GURL file_url = net_util::FilePathToFileURL(test_file); + GURL file_url = net::FilePathToFileURL(test_file); GURL initial_url = server.TestServerPageW( std::wstring(L"client-redirect?") + UTF8ToWide(file_url.spec())); @@ -236,7 +236,7 @@ TEST_F(RedirectTest, ClientFragments) { TestServer server(kDocRoot); std::wstring test_file = test_data_directory_; file_util::AppendToPath(&test_file, L"ref_redirect.html"); - GURL first_url = net_util::FilePathToFileURL(test_file); + GURL first_url = net::FilePathToFileURL(test_file); std::vector<GURL> redirects; NavigateToURL(first_url); diff --git a/chrome/browser/iframe_uitest.cc b/chrome/browser/iframe_uitest.cc index 9b3b178..7225943 100644 --- a/chrome/browser/iframe_uitest.cc +++ b/chrome/browser/iframe_uitest.cc @@ -38,7 +38,7 @@ class IFrameTest : public UITest { std::wstring test_file = test_data_directory_; file_util::AppendToPath(&test_file, url); - NavigateToURL(net_util::FilePathToFileURL(test_file)); + NavigateToURL(net::FilePathToFileURL(test_file)); Sleep(kWaitForActionMsec); // The browser lazily updates the title. // Make sure the navigation succeeded. diff --git a/chrome/browser/metrics_service_uitest.cc b/chrome/browser/metrics_service_uitest.cc index d78aa11..4d75529 100644 --- a/chrome/browser/metrics_service_uitest.cc +++ b/chrome/browser/metrics_service_uitest.cc @@ -60,12 +60,12 @@ class MetricsServiceTest : public UITest { std::wstring page1_path; ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &page1_path)); file_util::AppendToPath(&page1_path, L"title2.html"); - ASSERT_TRUE(window_->AppendTab(net_util::FilePathToFileURL(page1_path))); + ASSERT_TRUE(window_->AppendTab(net::FilePathToFileURL(page1_path))); std::wstring page2_path; ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &page2_path)); file_util::AppendToPath(&page2_path, L"iframe.html"); - ASSERT_TRUE(window_->AppendTab(net_util::FilePathToFileURL(page2_path))); + ASSERT_TRUE(window_->AppendTab(net::FilePathToFileURL(page2_path))); } // Get a PrefService whose contents correspond to the Local State file diff --git a/chrome/browser/net/dns_master_unittest.cc b/chrome/browser/net/dns_master_unittest.cc index 804af04..61bef9a 100644 --- a/chrome/browser/net/dns_master_unittest.cc +++ b/chrome/browser/net/dns_master_unittest.cc @@ -165,7 +165,7 @@ TimeDelta BlockingDnsLookup(const std::string& hostname) { // of DNS prefetching. TEST(DnsMasterTest, OsCachesLookupsTest) { SetupNetworkInfrastructure(); - WinsockInit ws_init; + net::WinsockInit ws_init; for (int i = 0; i < 5; i++) { std::string badname; @@ -185,7 +185,7 @@ TEST(DnsMasterTest, StartupShutdownTest) { TEST(DnsMasterTest, BenefitLookupTest) { SetupNetworkInfrastructure(); - WinsockInit ws_init; + net::WinsockInit ws_init; DnsPrefetcherInit dns_init(NULL); // Creates global service . DnsMaster testing_master(TimeDelta::FromMilliseconds(5000)); @@ -262,7 +262,7 @@ TEST(DnsMasterTest, BenefitLookupTest) { TEST(DnsMasterTest, DISABLED_SingleSlaveLookupTest) { SetupNetworkInfrastructure(); - WinsockInit ws_init; + net::WinsockInit ws_init; DnsPrefetcherInit dns_init(NULL); // Creates global service. DnsMaster testing_master(TimeDelta::FromMilliseconds(5000)); @@ -314,7 +314,7 @@ TEST(DnsMasterTest, DISABLED_SingleSlaveLookupTest) { TEST(DnsMasterTest, DISABLED_MultiThreadedLookupTest) { SetupNetworkInfrastructure(); - WinsockInit ws_init; + net::WinsockInit ws_init; DnsMaster testing_master(TimeDelta::FromSeconds(30)); DnsPrefetcherInit dns_init(NULL); @@ -361,7 +361,7 @@ TEST(DnsMasterTest, DISABLED_MultiThreadedLookupTest) { TEST(DnsMasterTest, DISABLED_MultiThreadedSpeedupTest) { SetupNetworkInfrastructure(); - WinsockInit ws_init; + net::WinsockInit ws_init; DnsMaster testing_master(TimeDelta::FromSeconds(30)); DnsPrefetcherInit dns_init(NULL); diff --git a/chrome/browser/page_info_window.cc b/chrome/browser/page_info_window.cc index dc6d8fa..7082e28 100644 --- a/chrome/browser/page_info_window.cc +++ b/chrome/browser/page_info_window.cc @@ -118,7 +118,8 @@ class SecurityTabView : public ChromeViews::View { // Returns a name that can be used to represent the issuer. It tries in this // order CN, O and OU and returns the first non-empty one found. - static std::string GetIssuerName(const X509Certificate::Principal& issuer); + static std::string GetIssuerName( + const net::X509Certificate::Principal& issuer); // Callback from history service with number of visits to url. void OnGotVisitCountToHost(HistoryService::Handle handle, @@ -253,7 +254,7 @@ SecurityTabView::SecurityTabView(Profile* profile, std::wstring identity_title; std::wstring identity_msg; std::wstring connection_msg; - scoped_refptr<X509Certificate> cert; + scoped_refptr<net::X509Certificate> cert; int cert_id = navigation_entry->GetSSLCertID(); int cert_status = navigation_entry->GetSSLCertStatus(); @@ -408,7 +409,7 @@ void SecurityTabView::Layout() { // static std::string SecurityTabView::GetIssuerName( - const X509Certificate::Principal& issuer) { + const net::X509Certificate::Principal& issuer) { if (!issuer.common_name.empty()) return issuer.common_name; if (!issuer.organization_names.empty()) @@ -667,7 +668,7 @@ void PageInfoWindow::CalculateWindowBounds(CRect* bounds) { } void PageInfoWindow::ShowCertDialog(int cert_id) { - scoped_refptr<X509Certificate> cert; + scoped_refptr<net::X509Certificate> cert; CertStore::GetSharedInstance()->RetrieveCert(cert_id, &cert); if (!cert.get()) { // The certificate was not found. Could be that the renderer crashed before diff --git a/chrome/browser/plugin_process_host.cc b/chrome/browser/plugin_process_host.cc index 2240c6f..7ee3015 100644 --- a/chrome/browser/plugin_process_host.cc +++ b/chrome/browser/plugin_process_host.cc @@ -133,7 +133,7 @@ class PluginDownloadUrlHelper : public URLRequest::Delegate { net::AuthChallengeInfo* auth_info); virtual void OnSSLCertificateError(URLRequest* request, int cert_error, - X509Certificate* cert); + net::X509Certificate* cert); virtual void OnResponseStarted(URLRequest* request); virtual void OnReadCompleted(URLRequest* request, int bytes_read); @@ -204,7 +204,7 @@ void PluginDownloadUrlHelper::OnAuthRequired( void PluginDownloadUrlHelper::OnSSLCertificateError(URLRequest* request, int cert_error, - X509Certificate* cert) { + net::X509Certificate* cert) { URLRequest::Delegate::OnSSLCertificateError(request, cert_error, cert); DownloadCompletedHelper(false); } diff --git a/chrome/browser/profile.cc b/chrome/browser/profile.cc index 3d146e4..626389b 100644 --- a/chrome/browser/profile.cc +++ b/chrome/browser/profile.cc @@ -146,7 +146,7 @@ class ProfileImpl::RequestContext : public URLRequestContext, if (record_mode || playback_mode) { // Don't use existing cookies and use an in-memory store. - cookie_store_ = new CookieMonster(); + cookie_store_ = new net::CookieMonster(); cache->set_mode( record_mode ? net::HttpCache::RECORD : net::HttpCache::PLAYBACK); } @@ -157,11 +157,11 @@ class ProfileImpl::RequestContext : public URLRequestContext, DCHECK(!cookie_store_path.empty()); cookie_db_.reset(new SQLitePersistentCookieStore( cookie_store_path, g_browser_process->db_thread()->message_loop())); - cookie_store_ = new CookieMonster(cookie_db_.get()); + cookie_store_ = new net::CookieMonster(cookie_db_.get()); } - cookie_policy_.SetType( - CookiePolicy::FromInt(prefs_->GetInteger(prefs::kCookieBehavior))); + cookie_policy_.SetType(net::CookiePolicy::FromInt( + prefs_->GetInteger(prefs::kCookieBehavior))); // The first request context to be created is the one for the default // profile - at least until we support multiple profiles. @@ -189,8 +189,8 @@ class ProfileImpl::RequestContext : public URLRequestContext, &RequestContext::OnAcceptLanguageChange, accept_language)); } else if (*pref_name_in == prefs::kCookieBehavior) { - CookiePolicy::Type type = - CookiePolicy::FromInt(prefs_->GetInteger(prefs::kCookieBehavior)); + net::CookiePolicy::Type type = net::CookiePolicy::FromInt( + prefs_->GetInteger(prefs::kCookieBehavior)); g_browser_process->io_thread()->message_loop()->PostTask(FROM_HERE, NewRunnableMethod(this, &RequestContext::OnCookiePolicyChange, @@ -216,7 +216,7 @@ class ProfileImpl::RequestContext : public URLRequestContext, accept_language_ = accept_language; } - void OnCookiePolicyChange(CookiePolicy::Type type) { + void OnCookiePolicyChange(net::CookiePolicy::Type type) { DCHECK(MessageLoop::current() == ChromeThread::GetMessageLoop(ChromeThread::IO)); cookie_policy_.SetType(type); @@ -265,9 +265,9 @@ class OffTheRecordRequestContext : public URLRequestContext, scoped_ptr<net::HttpProxyInfo> proxy_info(CreateProxyInfo(command_line)); http_transaction_factory_ = new net::HttpCache(NULL, 0); - cookie_store_ = new CookieMonster; - cookie_policy_.SetType( - CookiePolicy::FromInt(prefs_->GetInteger(prefs::kCookieBehavior))); + cookie_store_ = new net::CookieMonster; + cookie_policy_.SetType(net::CookiePolicy::FromInt( + prefs_->GetInteger(prefs::kCookieBehavior))); user_agent_ = original_context_->user_agent(); accept_language_ = original_context_->accept_language(); accept_charset_ = original_context_->accept_charset(); @@ -307,8 +307,8 @@ class OffTheRecordRequestContext : public URLRequestContext, &OffTheRecordRequestContext::OnAcceptLanguageChange, accept_language)); } else if (*pref_name_in == prefs::kCookieBehavior) { - CookiePolicy::Type type = - CookiePolicy::FromInt(prefs_->GetInteger(prefs::kCookieBehavior)); + net::CookiePolicy::Type type = net::CookiePolicy::FromInt( + prefs_->GetInteger(prefs::kCookieBehavior)); g_browser_process->io_thread()->message_loop()->PostTask(FROM_HERE, NewRunnableMethod(this, &OffTheRecordRequestContext::OnCookiePolicyChange, @@ -323,7 +323,7 @@ class OffTheRecordRequestContext : public URLRequestContext, accept_language_ = accept_language; } - void OnCookiePolicyChange(CookiePolicy::Type type) { + void OnCookiePolicyChange(net::CookiePolicy::Type type) { DCHECK(MessageLoop::current() == ChromeThread::GetMessageLoop(ChromeThread::IO)); cookie_policy_.SetType(type); diff --git a/chrome/browser/render_view_host.cc b/chrome/browser/render_view_host.cc index 7fe7e4e..c18356a 100644 --- a/chrome/browser/render_view_host.cc +++ b/chrome/browser/render_view_host.cc @@ -389,7 +389,7 @@ void RenderViewHost::DragTargetDragEnter(const WebDropData& drop_data, for (std::vector<std::wstring>::const_iterator iter(drop_data.filenames.begin()); iter != drop_data.filenames.end(); ++iter) { policy->GrantRequestURL(process()->host_id(), - net_util::FilePathToFileURL(*iter)); + net::FilePathToFileURL(*iter)); policy->GrantUploadFile(process()->host_id(), *iter); } Send(new ViewMsg_DragTargetDragEnter(routing_id_, drop_data, client_pt, diff --git a/chrome/browser/resource_dispatcher_host.cc b/chrome/browser/resource_dispatcher_host.cc index 87f504f..c81f9cb 100644 --- a/chrome/browser/resource_dispatcher_host.cc +++ b/chrome/browser/resource_dispatcher_host.cc @@ -1822,7 +1822,7 @@ void ResourceDispatcherHost::OnAuthRequired( void ResourceDispatcherHost::OnSSLCertificateError( URLRequest* request, int cert_error, - X509Certificate* cert) { + net::X509Certificate* cert) { DCHECK(request); SSLManager::OnSSLCertificateError(this, request, cert_error, cert, ui_loop_); } diff --git a/chrome/browser/resource_dispatcher_host.h b/chrome/browser/resource_dispatcher_host.h index 9614e08..a9099a9 100644 --- a/chrome/browser/resource_dispatcher_host.h +++ b/chrome/browser/resource_dispatcher_host.h @@ -350,7 +350,7 @@ class ResourceDispatcherHost : public URLRequest::Delegate { net::AuthChallengeInfo* auth_info); virtual void OnSSLCertificateError(URLRequest* request, int cert_error, - X509Certificate* cert); + net::X509Certificate* cert); virtual void OnResponseStarted(URLRequest* request); virtual void OnReadCompleted(URLRequest* request, int bytes_read); void OnResponseCompleted(URLRequest* request); diff --git a/chrome/browser/resource_dispatcher_host_uitest.cc b/chrome/browser/resource_dispatcher_host_uitest.cc index 0096f55..f39fd04 100644 --- a/chrome/browser/resource_dispatcher_host_uitest.cc +++ b/chrome/browser/resource_dispatcher_host_uitest.cc @@ -229,7 +229,7 @@ TEST_F(ResourceDispatcherTest, CrossSiteNavigationNonBuffered) { std::wstring test_file = test_data_directory_; file_util::AppendToPath(&test_file, L"title2.html"); bool timed_out = false; - tab->NavigateToURLWithTimeout(net_util::FilePathToFileURL(test_file), + tab->NavigateToURLWithTimeout(net::FilePathToFileURL(test_file), kWaitForActionMaxMsec, &timed_out); EXPECT_FALSE(timed_out); diff --git a/chrome/browser/safe_browsing/safe_browsing_service.cc b/chrome/browser/safe_browsing/safe_browsing_service.cc index f7e47f7..8e69d3d 100644 --- a/chrome/browser/safe_browsing/safe_browsing_service.cc +++ b/chrome/browser/safe_browsing/safe_browsing_service.cc @@ -207,7 +207,7 @@ void SafeBrowsingService::DisplayBlockingPage(const GURL& url, entry.render_view_id == render_view_id && entry.result == result && entry.domain == - RegistryControlledDomainService::GetDomainAndRegistry(url)) { + net::RegistryControlledDomainService::GetDomainAndRegistry(url)) { MessageLoop::current()->PostTask(FROM_HERE, NewRunnableMethod( this, &SafeBrowsingService::NotifyClientBlockingComplete, client, true)); @@ -405,8 +405,8 @@ void SafeBrowsingService::OnBlockingPageDone(SafeBrowsingBlockingPage* page, WhiteListedEntry entry; entry.render_process_host_id = page->render_process_host_id(); entry.render_view_id = page->render_view_id(); - entry.domain = - RegistryControlledDomainService::GetDomainAndRegistry(page->url()); + entry.domain = net::RegistryControlledDomainService::GetDomainAndRegistry( + page->url()); entry.result = page->result(); white_listed_entries_.push_back(entry); } diff --git a/chrome/browser/save_file_manager.cc b/chrome/browser/save_file_manager.cc index 886dd07..518f839 100644 --- a/chrome/browser/save_file_manager.cc +++ b/chrome/browser/save_file_manager.cc @@ -519,7 +519,7 @@ void SaveFileManager::SaveLocalFile(const std::wstring& original_file_url, GURL file_url(original_file_url); DCHECK(file_url.SchemeIsFile()); std::wstring file_path; - net_util::FileURLToFilePath(file_url, &file_path); + net::FileURLToFilePath(file_url, &file_path); // If we can not get valid file path from original URL, treat it as // disk error. if (file_path.empty()) diff --git a/chrome/browser/save_package.cc b/chrome/browser/save_package.cc index ef110b7..3aac7a8 100644 --- a/chrome/browser/save_package.cc +++ b/chrome/browser/save_package.cc @@ -237,7 +237,7 @@ bool SavePackage::GenerateFilename(const std::string& disposition, bool need_html_ext, std::wstring* generated_name) { std::wstring file_name = - net_util::GetSuggestedFilename(GURL(url), disposition, kDefaultSaveName); + net::GetSuggestedFilename(GURL(url), disposition, kDefaultSaveName); DCHECK(!file_name.empty()); // Check whether we have same name before. diff --git a/chrome/browser/session_history_uitest.cc b/chrome/browser/session_history_uitest.cc index 06de102..f8f62e3 100644 --- a/chrome/browser/session_history_uitest.cc +++ b/chrome/browser/session_history_uitest.cc @@ -51,7 +51,7 @@ class SessionHistoryTest : public UITest { file_util::AppendToPath(&path_prefix, L"session_history"); path_prefix += file_util::kPathSeparator; - url_prefix_ = UTF8ToWide(net_util::FilePathToFileURL(path_prefix).spec()); + url_prefix_ = UTF8ToWide(net::FilePathToFileURL(path_prefix).spec()); } virtual void SetUp() { diff --git a/chrome/browser/session_restore_uitest.cc b/chrome/browser/session_restore_uitest.cc index 587b30d..903bf0d 100644 --- a/chrome/browser/session_restore_uitest.cc +++ b/chrome/browser/session_restore_uitest.cc @@ -50,9 +50,9 @@ class SessionRestoreUITest : public UITest { file_util::AppendToPath(&path_prefix, L"session_history"); path_prefix += file_util::kPathSeparator; - url1 = net_util::FilePathToFileURL(path_prefix + L"bot1.html"); - url2 = net_util::FilePathToFileURL(path_prefix + L"bot2.html"); - url3 = net_util::FilePathToFileURL(path_prefix + L"bot3.html"); + url1 = net::FilePathToFileURL(path_prefix + L"bot1.html"); + url2 = net::FilePathToFileURL(path_prefix + L"bot2.html"); + url3 = net::FilePathToFileURL(path_prefix + L"bot3.html"); } virtual void QuitBrowserAndRestore() { diff --git a/chrome/browser/site_instance.cc b/chrome/browser/site_instance.cc index efe907f..99f64cb 100644 --- a/chrome/browser/site_instance.cc +++ b/chrome/browser/site_instance.cc @@ -115,7 +115,7 @@ GURL SiteInstance::GetSiteForURL(const GURL& url) { // If this URL has a registered domain, we only want to remember that part. std::string domain = - RegistryControlledDomainService::GetDomainAndRegistry(url); + net::RegistryControlledDomainService::GetDomainAndRegistry(url); if (!domain.empty()) { GURL::Replacements rep; rep.SetHostStr(domain); @@ -155,5 +155,5 @@ bool SiteInstance::IsSameWebSite(const GURL& url1, const GURL& url2) { return false; } - return RegistryControlledDomainService::SameDomainOrHost(url1, url2); + return net::RegistryControlledDomainService::SameDomainOrHost(url1, url2); } diff --git a/chrome/browser/ssl_error_info.cc b/chrome/browser/ssl_error_info.cc index fc6019c..992bece 100644 --- a/chrome/browser/ssl_error_info.cc +++ b/chrome/browser/ssl_error_info.cc @@ -53,7 +53,7 @@ SSLErrorInfo::SSLErrorInfo(const std::wstring& title, // static SSLErrorInfo SSLErrorInfo::CreateError(ErrorType error_type, - X509Certificate* cert, + net::X509Certificate* cert, const GURL& request_url) { std::wstring title, details, short_description; std::vector<std::wstring> extra_info; @@ -257,7 +257,7 @@ int SSLErrorInfo::GetErrorsForCertStatus(int cert_id, }; DCHECK(arraysize(kErrorFlags) == arraysize(kErrorTypes)); - scoped_refptr<X509Certificate> cert = NULL; + scoped_refptr<net::X509Certificate> cert = NULL; int count = 0; for (int i = 0; i < arraysize(kErrorFlags); ++i) { if (cert_status & kErrorFlags[i]) { diff --git a/chrome/browser/ssl_error_info.h b/chrome/browser/ssl_error_info.h index 5739a7b..e1b5a63 100644 --- a/chrome/browser/ssl_error_info.h +++ b/chrome/browser/ssl_error_info.h @@ -64,7 +64,7 @@ class SSLErrorInfo { static ErrorType NetErrorToErrorType(int net_error); static SSLErrorInfo CreateError(ErrorType error_type, - X509Certificate* cert, + net::X509Certificate* cert, const GURL& request_url); // Populates the specified |errors| vector with the errors contained in diff --git a/chrome/browser/ssl_manager.cc b/chrome/browser/ssl_manager.cc index c15436d..0e9b16a 100644 --- a/chrome/browser/ssl_manager.cc +++ b/chrome/browser/ssl_manager.cc @@ -266,7 +266,7 @@ void SSLManager::AddMessageToConsole(const std::wstring& msg, // Delegate API method. -void SSLManager::DenyCertForHost(X509Certificate* cert, +void SSLManager::DenyCertForHost(net::X509Certificate* cert, const std::string& host) { // Remember that we don't like this cert for this host. // TODO(abarth): Do we want to persist this information in the user's profile? @@ -274,7 +274,7 @@ void SSLManager::DenyCertForHost(X509Certificate* cert, } // Delegate API method. -void SSLManager::AllowCertForHost(X509Certificate* cert, +void SSLManager::AllowCertForHost(net::X509Certificate* cert, const std::string& host) { // Remember that we do like this cert for this host. // TODO(abarth): Do we want to persist this information in the user's profile? @@ -282,8 +282,8 @@ void SSLManager::AllowCertForHost(X509Certificate* cert, } // Delegate API method. -X509Certificate::Policy::Judgment SSLManager::QueryPolicy( - X509Certificate* cert, const std::string& host) { +net::X509Certificate::Policy::Judgment SSLManager::QueryPolicy( + net::X509Certificate* cert, const std::string& host) { // TODO(abarth): Do we want to read this information from the user's profile? return cert_policy_for_host_[host].Check(cert); } @@ -512,7 +512,7 @@ SSLManager::CertError::CertError( URLRequest* request, ResourceType::Type resource_type, int cert_error, - X509Certificate* cert, + net::X509Certificate* cert, MessageLoop* ui_loop) : ErrorHandler(rdh, request, ui_loop), cert_error_(cert_error), @@ -529,7 +529,7 @@ SSLManager::CertError::CertError( void SSLManager::OnSSLCertificateError(ResourceDispatcherHost* rdh, URLRequest* request, int cert_error, - X509Certificate* cert, + net::X509Certificate* cert, MessageLoop* ui_loop) { DLOG(INFO) << "OnSSLCertificateError() cert_error: " << cert_error << " url: " << request->url().spec(); @@ -751,7 +751,7 @@ bool SSLManager::DeserializeSecurityInfo(const std::string& state, } // static -bool SSLManager::GetEVCertNames(const X509Certificate& cert, +bool SSLManager::GetEVCertNames(const net::X509Certificate& cert, std::wstring* short_name, std::wstring* ca_name) { DCHECK(short_name || ca_name); diff --git a/chrome/browser/ssl_manager.h b/chrome/browser/ssl_manager.h index c0d6750..943c29c 100644 --- a/chrome/browser/ssl_manager.h +++ b/chrome/browser/ssl_manager.h @@ -215,7 +215,7 @@ class SSLManager : public NotificationObserver { URLRequest* request, ResourceType::Type resource_type, int cert_error, - X509Certificate* cert, + net::X509Certificate* cert, MessageLoop* ui_loop); // ErrorHandler methods @@ -318,14 +318,14 @@ class SSLManager : public NotificationObserver { ConsoleMessageLevel level); // Records that |cert| is permitted to be used for |host| in the future. - void DenyCertForHost(X509Certificate* cert, const std::string& host); + void DenyCertForHost(net::X509Certificate* cert, const std::string& host); // Records that |cert| is not permitted to be used for |host| in the future. - void AllowCertForHost(X509Certificate* cert, const std::string& host); + void AllowCertForHost(net::X509Certificate* cert, const std::string& host); // Queries whether |cert| is allowed or denied for |host|. - X509Certificate::Policy::Judgment QueryPolicy(X509Certificate* cert, - const std::string& host); + net::X509Certificate::Policy::Judgment QueryPolicy( + net::X509Certificate* cert, const std::string& host); // Allow mixed/unsafe content to be visible (non filtered) for the specified // URL. @@ -353,7 +353,7 @@ class SSLManager : public NotificationObserver { static void OnSSLCertificateError(ResourceDispatcherHost* resource_dispatcher, URLRequest* request, int cert_error, - X509Certificate* cert, + net::X509Certificate* cert, MessageLoop* ui_loop); // Called when a mixed-content sub-resource request has been detected. The @@ -414,7 +414,7 @@ class SSLManager : public NotificationObserver { // Sets |short_name| to <organization_name> [<country>] and |ca_name| // to something like: // "Verified by <issuer_organization_name>" - static bool GetEVCertNames(const X509Certificate& cert, + static bool GetEVCertNames(const net::X509Certificate& cert, std::wstring* short_name, std::wstring* ca_name); @@ -470,7 +470,7 @@ class SSLManager : public NotificationObserver { ObserverList<SSLInfoBar> visible_info_bars_; // Certificate policies for each host. - std::map<std::string, X509Certificate::Policy> cert_policy_for_host_; + std::map<std::string, net::X509Certificate::Policy> cert_policy_for_host_; // Domains for which it is OK to show insecure content. std::set<std::string> can_show_insecure_content_for_host_; diff --git a/chrome/browser/ssl_policy.cc b/chrome/browser/ssl_policy.cc index 08f7936..1ae9ae1 100644 --- a/chrome/browser/ssl_policy.cc +++ b/chrome/browser/ssl_policy.cc @@ -303,21 +303,21 @@ class DefaultPolicy : public SSLPolicy { } // First we check if we know the policy for this error. - X509Certificate::Policy::Judgment judgment = + net::X509Certificate::Policy::Judgment judgment = error->manager()->QueryPolicy(error->ssl_info().cert, error->request_url().host()); - switch(judgment) { - case X509Certificate::Policy::ALLOWED: + switch (judgment) { + case net::X509Certificate::Policy::ALLOWED: // We've been told to allow this certificate. error->manager()->SetMaxSecurityStyle( SECURITY_STYLE_AUTHENTICATION_BROKEN); error->ContinueRequest(); break; - case X509Certificate::Policy::DENIED: + case net::X509Certificate::Policy::DENIED: // For now we handle the DENIED as the UNKNOWN, which means a blocking // page is shown to the user every time he comes back to the page. - case X509Certificate::Policy::UNKNOWN: + case net::X509Certificate::Policy::UNKNOWN: // We don't know how to handle this error. Ask our sub-policies. sub_policies_[index]->OnCertError(main_frame_url, error); break; diff --git a/chrome/browser/tab_contents.cc b/chrome/browser/tab_contents.cc index 364ef91..7f6c9e8 100644 --- a/chrome/browser/tab_contents.cc +++ b/chrome/browser/tab_contents.cc @@ -166,7 +166,7 @@ bool TabContents::GetSSLEVText(std::wstring* ev_text, ((entry->GetSSLCertStatus() & net::CERT_STATUS_IS_EV) == 0)) return false; - scoped_refptr<X509Certificate> cert; + scoped_refptr<net::X509Certificate> cert; CertStore::GetSharedInstance()->RetrieveCert(entry->GetSSLCertID(), &cert); if (!cert.get()) { NOTREACHED(); diff --git a/chrome/browser/tab_restore_uitest.cc b/chrome/browser/tab_restore_uitest.cc index 7765902..811b6d2 100644 --- a/chrome/browser/tab_restore_uitest.cc +++ b/chrome/browser/tab_restore_uitest.cc @@ -47,8 +47,8 @@ class TabRestoreUITest : public UITest { std::wstring path_prefix = test_data_directory_; file_util::AppendToPath(&path_prefix, L"session_history"); path_prefix += file_util::kPathSeparator; - url1_ = net_util::FilePathToFileURL(path_prefix + L"bot1.html"); - url2_ = net_util::FilePathToFileURL(path_prefix + L"bot2.html"); + url1_ = net::FilePathToFileURL(path_prefix + L"bot1.html"); + url2_ = net::FilePathToFileURL(path_prefix + L"bot2.html"); } protected: diff --git a/chrome/browser/template_url_model.cc b/chrome/browser/template_url_model.cc index b137915..85e4a78 100644 --- a/chrome/browser/template_url_model.cc +++ b/chrome/browser/template_url_model.cc @@ -174,7 +174,7 @@ std::wstring TemplateURLModel::GenerateKeyword(const GURL& url, // Strip "www." off the front of the keyword; otherwise the keyword won't work // properly. See http://b/issue?id=1205573. - return net_util::StripWWW(UTF8ToWide(url.host())); + return net::StripWWW(UTF8ToWide(url.host())); } // static @@ -195,7 +195,7 @@ std::wstring TemplateURLModel::CleanUserInputKeyword( } // Remove leading "www.". - result = net_util::StripWWW(result); + result = net::StripWWW(result); // Remove trailing "/". return (result.length() > 0 && result[result.length() - 1] == L'/') ? diff --git a/chrome/browser/toolbar_model.cc b/chrome/browser/toolbar_model.cc index e6bf8bc..6321555 100644 --- a/chrome/browser/toolbar_model.cc +++ b/chrome/browser/toolbar_model.cc @@ -200,7 +200,7 @@ void ToolbarModel::GetInfoText(std::wstring* text, ((entry->GetSSLCertStatus() & net::CERT_STATUS_IS_EV) == 0)) return; - scoped_refptr<X509Certificate> cert; + scoped_refptr<net::X509Certificate> cert; CertStore::GetSharedInstance()->RetrieveCert(entry->GetSSLCertID(), &cert); if (!cert.get()) { NOTREACHED(); diff --git a/chrome/browser/url_fixer_upper.cc b/chrome/browser/url_fixer_upper.cc index 9fb2cde..f687d6e 100644 --- a/chrome/browser/url_fixer_upper.cc +++ b/chrome/browser/url_fixer_upper.cc @@ -84,7 +84,7 @@ static wstring FixupPath(const wstring& text) { filename[1] = ':'; // Here, we know the input looks like a file. - GURL file_url = net_util::FilePathToFileURL(filename); + GURL file_url = net::FilePathToFileURL(filename); if (file_url.is_valid()) return gfx::ElideUrl(file_url, ChromeFont(), 0, std::wstring()); @@ -108,7 +108,7 @@ static void AddDesiredTLD(const wstring& desired_tld, // TLD). We disallow unknown registries here so users can input "mail.yahoo" // and hit ctrl-enter to get "www.mail.yahoo.com". const size_t registry_length = - RegistryControlledDomainService::GetRegistryLength(*domain, false); + net::RegistryControlledDomainService::GetRegistryLength(*domain, false); if (registry_length != 0) return; @@ -457,7 +457,7 @@ wstring URLFixerUpper::FixupRelativeFile(const wstring& base_dir, SetCurrentDirectory(old_cur_directory); if (is_file) { - GURL file_url = net_util::FilePathToFileURL(full_path); + GURL file_url = net::FilePathToFileURL(full_path); if (file_url.is_valid()) return gfx::ElideUrl(file_url, ChromeFont(), 0, std::wstring()); // Invalid files fall through to regular processing. diff --git a/chrome/browser/url_fixer_upper_unittest.cc b/chrome/browser/url_fixer_upper_unittest.cc index a885525..713a8f1 100644 --- a/chrome/browser/url_fixer_upper_unittest.cc +++ b/chrome/browser/url_fixer_upper_unittest.cc @@ -164,7 +164,7 @@ static bool IsMatchingFileURL(const std::wstring& url, return false; // contains backslashes std::wstring derived_path; - net_util::FileURLToFilePath(GURL(url), &derived_path); + net::FileURLToFilePath(GURL(url), &derived_path); return (derived_path.length() == full_file_path.length()) && std::equal(derived_path.begin(), derived_path.end(), full_file_path.begin(), CaseInsensitiveCompare<wchar_t>()); @@ -249,7 +249,7 @@ TEST(URLFixerUpperTest, FixupFile) { // reference path std::wstring golden = - UTF8ToWide(net_util::FilePathToFileURL(original).spec()); + UTF8ToWide(net::FilePathToFileURL(original).spec()); // c:\foo\bar.txt -> file:///c:/foo/bar.txt (basic) std::wstring fixedup = URLFixerUpper::FixupURL(original, L""); diff --git a/chrome/browser/views/constrained_window_impl_interactive_uitest.cc b/chrome/browser/views/constrained_window_impl_interactive_uitest.cc index b06efd3..1fd47ea 100644 --- a/chrome/browser/views/constrained_window_impl_interactive_uitest.cc +++ b/chrome/browser/views/constrained_window_impl_interactive_uitest.cc @@ -62,7 +62,7 @@ TEST_F(InteractiveConstrainedWindowTest, UserActivatedResizeToLeavesSpaceForChro file_util::AppendToPath(&filename, L"constrained_files"); file_util::AppendToPath(&filename, L"constrained_window_onload_resizeto.html"); - ASSERT_TRUE(tab->NavigateToURL(net_util::FilePathToFileURL(filename))); + ASSERT_TRUE(tab->NavigateToURL(net::FilePathToFileURL(filename))); gfx::Rect tab_view_bounds; ASSERT_TRUE(window->GetViewBounds(VIEW_ID_TAB_CONTAINER, diff --git a/chrome/browser/views/options/advanced_contents_view.cc b/chrome/browser/views/options/advanced_contents_view.cc index 52ed1df..29382c4 100644 --- a/chrome/browser/views/options/advanced_contents_view.cc +++ b/chrome/browser/views/options/advanced_contents_view.cc @@ -636,16 +636,16 @@ class CookieBehaviorComboModel : public ChromeViews::ComboBox::Model { return L""; } - static int CookiePolicyToIndex(CookiePolicy::Type policy) { + static int CookiePolicyToIndex(net::CookiePolicy::Type policy) { return policy; } - static CookiePolicy::Type IndexToCookiePolicy(int index) { - if (CookiePolicy::ValidType(index)) - return CookiePolicy::FromInt(index); + static net::CookiePolicy::Type IndexToCookiePolicy(int index) { + if (net::CookiePolicy::ValidType(index)) + return net::CookiePolicy::FromInt(index); NOTREACHED(); - return CookiePolicy::ALLOW_ALL_COOKIES; + return net::CookiePolicy::ALLOW_ALL_COOKIES; } private: @@ -775,7 +775,7 @@ void SecuritySection::ItemChanged(ChromeViews::ComboBox* sender, UserMetricsRecordAction(kUserMetrics[filter_policy], profile()->GetPrefs()); filter_mixed_content_.SetValue(filter_policy); } else if (sender == cookie_behavior_combobox_) { - CookiePolicy::Type cookie_policy = + net::CookiePolicy::Type cookie_policy = CookieBehaviorComboModel::IndexToCookiePolicy(new_index); const wchar_t* kUserMetrics[] = { L"Options_AllowAllCookies", @@ -884,7 +884,7 @@ void SecuritySection::NotifyPrefChanged(const std::wstring* pref_name) { if (!pref_name || *pref_name == prefs::kCookieBehavior) { cookie_behavior_combobox_->SetSelectedItem( CookieBehaviorComboModel::CookiePolicyToIndex( - CookiePolicy::FromInt(cookie_behavior_.GetValue()))); + net::CookiePolicy::FromInt(cookie_behavior_.GetValue()))); } if (!pref_name || *pref_name == prefs::kSafeBrowsingEnabled) enable_safe_browsing_checkbox_->SetIsSelected(safe_browsing_.GetValue()); diff --git a/chrome/browser/views/options/cookies_view.cc b/chrome/browser/views/options/cookies_view.cc index bd5424d..8d93fed 100644 --- a/chrome/browser/views/options/cookies_view.cc +++ b/chrome/browser/views/options/cookies_view.cc @@ -66,7 +66,7 @@ class CookiesTableModel : public ChromeViews::TableModel { // Returns information about the Cookie at the specified index. std::string GetDomainAt(int index); - CookieMonster::CanonicalCookie& GetCookieAt(int index); + net::CookieMonster::CanonicalCookie& GetCookieAt(int index); // Remove the specified cookies from the Cookie Monster and update the view. void RemoveCookies(int start_index, int remove_count); @@ -90,8 +90,8 @@ class CookiesTableModel : public ChromeViews::TableModel { // The profile from which this model sources cookies. Profile* profile_; - typedef CookieMonster::CookieList CookieList; - typedef std::vector<CookieMonster::CookieListPair*> CookiePtrList; + typedef net::CookieMonster::CookieList CookieList; + typedef std::vector<net::CookieMonster::CookieListPair*> CookiePtrList; CookieList all_cookies_; CookiePtrList shown_cookies_; @@ -121,7 +121,8 @@ std::string CookiesTableModel::GetDomainAt(int index) { return shown_cookies_.at(index)->first; } -CookieMonster::CanonicalCookie& CookiesTableModel::GetCookieAt(int index) { +net::CookieMonster::CanonicalCookie& CookiesTableModel::GetCookieAt( + int index) { DCHECK(index >= 0 && index < RowCount()); return shown_cookies_.at(index)->second; } @@ -132,7 +133,7 @@ void CookiesTableModel::RemoveCookies(int start_index, int remove_count) { return; } - CookieMonster* monster = profile_->GetRequestContext()->cookie_store(); + net::CookieMonster* monster = profile_->GetRequestContext()->cookie_store(); // We need to update the searched results list, the full cookie list, // and the view. We walk through the search results list (which is what @@ -207,17 +208,18 @@ void CookiesTableModel::SetObserver(ChromeViews::TableModelObserver* observer) { // Returns true if |cookie| matches the specified filter, where "match" is // defined as the cookie's domain, name and value contains filter text // somewhere. -static bool ContainsFilterText(const std::string& domain, - const CookieMonster::CanonicalCookie& cookie, - const std::string& filter) { +static bool ContainsFilterText( + const std::string& domain, + const net::CookieMonster::CanonicalCookie& cookie, + const std::string& filter) { return domain.find(filter) != std::string::npos || cookie.Name().find(filter) != std::string::npos || cookie.Value().find(filter) != std::string::npos; } // Sort ignore the '.' prefix for domain cookies. -static bool CookieSorter(const CookieMonster::CookieListPair& cp1, - const CookieMonster::CookieListPair& cp2) { +static bool CookieSorter(const net::CookieMonster::CookieListPair& cp1, + const net::CookieMonster::CookieListPair& cp2) { bool is1domain = !cp1.first.empty() && cp1.first[0] == '.'; bool is2domain = !cp2.first.empty() && cp2.first[0] == '.'; @@ -235,7 +237,7 @@ static bool CookieSorter(const CookieMonster::CookieListPair& cp1, void CookiesTableModel::LoadCookies() { // mmargh mmargh mmargh! - CookieMonster* cookie_monster = + net::CookieMonster* cookie_monster = profile_->GetRequestContext()->cookie_store(); all_cookies_ = cookie_monster->GetAllCookies(); std::sort(all_cookies_.begin(), all_cookies_.end(), CookieSorter); @@ -335,7 +337,7 @@ class CookieInfoView : public ChromeViews::View { // Update the display from the specified CookieNode. void SetCookie(const std::string& domain, - const CookieMonster::CanonicalCookie& cookie_node); + const net::CookieMonster::CanonicalCookie& cookie_node); // Clears the cookie display to indicate that no or multiple cookies are // selected. @@ -393,8 +395,9 @@ CookieInfoView::CookieInfoView() CookieInfoView::~CookieInfoView() { } -void CookieInfoView::SetCookie(const std::string& domain, - const CookieMonster::CanonicalCookie& cookie) { +void CookieInfoView::SetCookie( + const std::string& domain, + const net::CookieMonster::CanonicalCookie& cookie) { name_value_field_->SetText(UTF8ToWide(cookie.Name())); content_value_field_->SetText(UTF8ToWide(cookie.Value())); domain_value_field_->SetText(UTF8ToWide(domain)); diff --git a/chrome/browser/web_contents.cc b/chrome/browser/web_contents.cc index 5a330e7..0d5ed17 100644 --- a/chrome/browser/web_contents.cc +++ b/chrome/browser/web_contents.cc @@ -1301,7 +1301,8 @@ void WebContents::UpdateHistoryForNavigation(const GURL& display_url, void WebContents::MaybeCloseChildWindows( const ViewHostMsg_FrameNavigate_Params& params) { - if (RegistryControlledDomainService::SameDomainOrHost(last_url_, params.url)) + if (net::RegistryControlledDomainService::SameDomainOrHost( + last_url_, params.url)) return; last_url_ = params.url; @@ -1876,7 +1877,7 @@ void WebContents::DidNavigateAnyFramePreCommit( DownloadManager* download_manager = profile()->GetDownloadManager(); // download_manager can be NULL in unit test context. if (download_manager && download_manager ->in_progress_count() == 0 && - current_entry && !RegistryControlledDomainService::SameDomainOrHost( + current_entry && !net::RegistryControlledDomainService::SameDomainOrHost( current_entry->GetURL(), entry->GetURL())) { TimeDelta time_delta( TimeTicks::Now() - last_download_shelf_show_); diff --git a/chrome/common/gfx/url_elider.cc b/chrome/common/gfx/url_elider.cc index 5ffdfe4..6eff901 100644 --- a/chrome/common/gfx/url_elider.cc +++ b/chrome/common/gfx/url_elider.cc @@ -113,7 +113,7 @@ std::wstring ElideUrl(const GURL& url, // Get domain and registry information from the URL. std::wstring url_domain = UTF8ToWide( - RegistryControlledDomainService::GetDomainAndRegistry(url)); + net::RegistryControlledDomainService::GetDomainAndRegistry(url)); if (url_domain.empty()) url_domain = url_host; @@ -353,7 +353,7 @@ void AppendFormattedHost(const GURL& url, DCHECK(host.begin >= 0 && ((spec.length() == 0 && host.begin == 0) || host.begin < static_cast<int>(spec.length()))); - net_util::IDNToUnicode(&spec[host.begin], host.len, languages, output); + net::IDNToUnicode(&spec[host.begin], host.len, languages, output); new_parsed->host.len = static_cast<int>(output->length()) - new_parsed->host.begin; diff --git a/chrome/common/net/cookie_monster_sqlite.cc b/chrome/common/net/cookie_monster_sqlite.cc index 259b8f2..51c417b 100644 --- a/chrome/common/net/cookie_monster_sqlite.cc +++ b/chrome/common/net/cookie_monster_sqlite.cc @@ -59,9 +59,9 @@ class SQLitePersistentCookieStore::Backend // Batch a cookie add void AddCookie(const std::string& key, - const CookieMonster::CanonicalCookie& cc); + const net::CookieMonster::CanonicalCookie& cc); // Batch a cookie delete - void DeleteCookie(const CookieMonster::CanonicalCookie& cc); + void DeleteCookie(const net::CookieMonster::CanonicalCookie& cc); // Commit and pending operations and close the database, must be called // before the object is destructed. void Close(); @@ -76,24 +76,24 @@ class SQLitePersistentCookieStore::Backend PendingOperation(OperationType op, const std::string& key, - const CookieMonster::CanonicalCookie& cc) + const net::CookieMonster::CanonicalCookie& cc) : op_(op), key_(key), cc_(cc) { } OperationType op() const { return op_; } const std::string& key() const { return key_; } - const CookieMonster::CanonicalCookie& cc() const { return cc_; } + const net::CookieMonster::CanonicalCookie& cc() const { return cc_; } private: OperationType op_; std::string key_; // Only used for OP_ADD - CookieMonster::CanonicalCookie cc_; + net::CookieMonster::CanonicalCookie cc_; }; private: // Batch a cookie operation (add or delete) void BatchOperation(PendingOperation::OperationType op, const std::string& key, - const CookieMonster::CanonicalCookie& cc); + const net::CookieMonster::CanonicalCookie& cc); // Commit our pending operations to the database. void Commit(); // Close() executed on the background thread. @@ -113,19 +113,19 @@ class SQLitePersistentCookieStore::Backend void SQLitePersistentCookieStore::Backend::AddCookie( const std::string& key, - const CookieMonster::CanonicalCookie& cc) { + const net::CookieMonster::CanonicalCookie& cc) { BatchOperation(PendingOperation::COOKIE_ADD, key, cc); } void SQLitePersistentCookieStore::Backend::DeleteCookie( - const CookieMonster::CanonicalCookie& cc) { + const net::CookieMonster::CanonicalCookie& cc) { BatchOperation(PendingOperation::COOKIE_DELETE, std::string(), cc); } void SQLitePersistentCookieStore::Backend::BatchOperation( PendingOperation::OperationType op, const std::string& key, - const CookieMonster::CanonicalCookie& cc) { + const net::CookieMonster::CanonicalCookie& cc) { // Commit every 30 seconds. static const int kCommitIntervalMs = 30 * 1000; // Commit right away if we have more than 512 outstanding operations. @@ -288,7 +288,7 @@ bool InitTable(sqlite3* db) { } // namespace bool SQLitePersistentCookieStore::Load( - std::vector<CookieMonster::KeyedCanonicalCookie>* cookies) { + std::vector<net::CookieMonster::KeyedCanonicalCookie>* cookies) { DCHECK(!path_.empty()); sqlite3* db; if (sqlite3_open(WideToUTF8(path_).c_str(), &db) != SQLITE_OK) { @@ -323,8 +323,8 @@ bool SQLitePersistentCookieStore::Load( while (smt.step() == SQLITE_ROW) { std::string key = smt.column_string(1); - scoped_ptr<CookieMonster::CanonicalCookie> cc( - new CookieMonster::CanonicalCookie( + scoped_ptr<net::CookieMonster::CanonicalCookie> cc( + new net::CookieMonster::CanonicalCookie( smt.column_string(2), // name smt.column_string(3), // value smt.column_string(4), // path @@ -340,8 +340,8 @@ bool SQLitePersistentCookieStore::Load( DLOG_IF(WARNING, cc->CreationDate() > Time::Now()) << L"CreationDate too recent"; cookies->push_back( - CookieMonster::KeyedCanonicalCookie(smt.column_string(1), - cc.release())); + net::CookieMonster::KeyedCanonicalCookie(smt.column_string(1), + cc.release())); } // Create the backend, this will take ownership of the db pointer. @@ -366,13 +366,13 @@ bool SQLitePersistentCookieStore::EnsureDatabaseVersion(sqlite3* db) { void SQLitePersistentCookieStore::AddCookie( const std::string& key, - const CookieMonster::CanonicalCookie& cc) { + const net::CookieMonster::CanonicalCookie& cc) { if (backend_.get()) backend_->AddCookie(key, cc); } void SQLitePersistentCookieStore::DeleteCookie( - const CookieMonster::CanonicalCookie& cc) { + const net::CookieMonster::CanonicalCookie& cc) { if (backend_.get()) backend_->DeleteCookie(cc); } diff --git a/chrome/common/net/cookie_monster_sqlite.h b/chrome/common/net/cookie_monster_sqlite.h index 49de96a..44d1e1dd 100644 --- a/chrome/common/net/cookie_monster_sqlite.h +++ b/chrome/common/net/cookie_monster_sqlite.h @@ -43,17 +43,17 @@ struct sqlite3; class SQLitePersistentCookieStore - : public CookieMonster::PersistentCookieStore { + : public net::CookieMonster::PersistentCookieStore { public: SQLitePersistentCookieStore(const std::wstring& path, MessageLoop* background_loop); ~SQLitePersistentCookieStore(); - virtual bool Load(std::vector<CookieMonster::KeyedCanonicalCookie>*); + virtual bool Load(std::vector<net::CookieMonster::KeyedCanonicalCookie>*); virtual void AddCookie(const std::string&, - const CookieMonster::CanonicalCookie&); - virtual void DeleteCookie(const CookieMonster::CanonicalCookie&); + const net::CookieMonster::CanonicalCookie&); + virtual void DeleteCookie(const net::CookieMonster::CanonicalCookie&); private: class Backend; diff --git a/chrome/common/net/url_request_intercept_job.cc b/chrome/common/net/url_request_intercept_job.cc index 4da58d0c..3f245de 100644 --- a/chrome/common/net/url_request_intercept_job.cc +++ b/chrome/common/net/url_request_intercept_job.cc @@ -160,10 +160,10 @@ void URLRequestInterceptJob::GetResponseInfo(net::HttpResponseInfo* info) { << request_->url(); info->ssl_info.cert = - new X509Certificate(request_->url().GetWithEmptyPath().spec(), - kCertIssuer, - Time::Now(), - Time::Now() + TimeDelta::FromDays(kLifetimeDays)); + new net::X509Certificate(request_->url().GetWithEmptyPath().spec(), + kCertIssuer, + Time::Now(), + Time::Now() + TimeDelta::FromDays(kLifetimeDays)); info->ssl_info.cert_status = 0; info->ssl_info.security_bits = 0; } diff --git a/chrome/common/os_exchange_data.cc b/chrome/common/os_exchange_data.cc index 05984b5..7e311f6 100644 --- a/chrome/common/os_exchange_data.cc +++ b/chrome/common/os_exchange_data.cc @@ -663,8 +663,8 @@ static void CreateValidFileNameFromTitle(const GURL& url, std::wstring* validated) { if (title.empty()) { if (url.is_valid()) { - *validated = net_util::GetSuggestedFilename(url, std::wstring(), - std::wstring()); + *validated = net::GetSuggestedFilename( + url, std::wstring(), std::wstring()); } else { // Nothing else can be done, just use a default. *validated = l10n_util::GetString(IDS_UNTITLED_SHORTCUT_FILE_NAME); diff --git a/chrome/test/accessibility/accessibility_tests.cc b/chrome/test/accessibility/accessibility_tests.cc index 84dee3b..f00f9e4 100644 --- a/chrome/test/accessibility/accessibility_tests.cc +++ b/chrome/test/accessibility/accessibility_tests.cc @@ -218,7 +218,7 @@ TEST_F(AccessibilityTest, TestStarBtnStatusOnNewTab) { ASSERT_TRUE(tab1.get()); std::wstring test_file1 = test_data_directory_; file_util::AppendToPath(&test_file1, L"title1.html"); - tab1->NavigateToURL(net_util::FilePathToFileURL(test_file1)); + tab1->NavigateToURL(net::FilePathToFileURL(test_file1)); Sleep(kWaitForActionMsec); EXPECT_EQ(L"focusable", GetState(p_toolbar, button)); @@ -239,7 +239,7 @@ TEST_F(AccessibilityTest, TestStarBtnStatusOnNewTab) { old_tab_count = new_tab_count; std::wstring test_file2 = test_data_directory_; file_util::AppendToPath(&test_file2, L"title1.html"); - ASSERT_TRUE(window->AppendTab(net_util::FilePathToFileURL(test_file2))); + ASSERT_TRUE(window->AppendTab(net::FilePathToFileURL(test_file2))); ASSERT_TRUE(window->WaitForTabCountToChange(old_tab_count, &new_tab_count, 5000)); // Check tab count. Also, check accessibility object's children. @@ -320,7 +320,7 @@ TEST_F(AccessibilityTest, DISABLED_TestBackBtnStatusOnNewTab) { ASSERT_TRUE(tab1.get()); std::wstring test_file1 = test_data_directory_; file_util::AppendToPath(&test_file1, L"title1.html"); - tab1->NavigateToURL(net_util::FilePathToFileURL(test_file1)); + tab1->NavigateToURL(net::FilePathToFileURL(test_file1)); Sleep(kWaitForActionMsec); if (win_util::GetWinVersion() > win_util::WINVERSION_2000) { EXPECT_EQ(L"has popup, focusable", @@ -356,7 +356,7 @@ TEST_F(AccessibilityTest, DISABLED_TestBackBtnStatusOnNewTab) { old_tab_count = new_tab_count; std::wstring test_file2 = test_data_directory_; file_util::AppendToPath(&test_file2, L"title1.html"); - ASSERT_TRUE(window->AppendTab(net_util::FilePathToFileURL(test_file2))); + ASSERT_TRUE(window->AppendTab(net::FilePathToFileURL(test_file2))); ASSERT_TRUE(window->WaitForTabCountToChange(old_tab_count, &new_tab_count, 5000)); // Check tab count. Also, check accessibility object's children. @@ -441,7 +441,7 @@ TEST_F(AccessibilityTest, DISABLED_TestForwardBtnStatusOnNewTab) { ASSERT_TRUE(tab1.get()); std::wstring test_file1 = test_data_directory_; file_util::AppendToPath(&test_file1, L"title1.html"); - tab1->NavigateToURL(net_util::FilePathToFileURL(test_file1)); + tab1->NavigateToURL(net::FilePathToFileURL(test_file1)); Sleep(kWaitForActionMsec); if (win_util::GetWinVersion() > win_util::WINVERSION_2000) { EXPECT_EQ(L"has popup, focusable, unavailable", @@ -486,7 +486,7 @@ TEST_F(AccessibilityTest, DISABLED_TestForwardBtnStatusOnNewTab) { old_tab_count = new_tab_count; std::wstring test_file2 = test_data_directory_; file_util::AppendToPath(&test_file2, L"title1.html"); - ASSERT_TRUE(window->AppendTab(net_util::FilePathToFileURL(test_file2))); + ASSERT_TRUE(window->AppendTab(net::FilePathToFileURL(test_file2))); ASSERT_TRUE(window->WaitForTabCountToChange(old_tab_count, &new_tab_count, 5000)); // Check tab count. diff --git a/chrome/test/automation/automation_proxy_uitest.cc b/chrome/test/automation/automation_proxy_uitest.cc index b639007..74a2eef 100644 --- a/chrome/test/automation/automation_proxy_uitest.cc +++ b/chrome/test/automation/automation_proxy_uitest.cc @@ -197,7 +197,7 @@ TEST_F(AutomationProxyVisibleTest, AppendTab) { std::wstring filename(test_data_directory_); file_util::AppendToPath(&filename, L"title2.html"); - ASSERT_TRUE(window->AppendTab(net_util::FilePathToFileURL(filename))); + ASSERT_TRUE(window->AppendTab(net::FilePathToFileURL(filename))); int appended_tab_index; // Append tab will also be active tab @@ -266,7 +266,7 @@ TEST_F(AutomationProxyTest, NavigateToURL) { std::wstring filename(test_data_directory_); file_util::AppendToPath(&filename, L"title2.html"); - tab->NavigateToURL(net_util::FilePathToFileURL(filename)); + tab->NavigateToURL(net::FilePathToFileURL(filename)); ASSERT_TRUE(tab->GetTabTitle(&title)); ASSERT_STREQ(L"Title Of Awesomeness", title.c_str()); @@ -284,7 +284,7 @@ TEST_F(AutomationProxyTest, DISABLED_NavigateToURLWithTimeout1) { file_util::AppendToPath(&filename, L"title2.html"); bool is_timeout; - tab->NavigateToURLWithTimeout(net_util::FilePathToFileURL(filename), + tab->NavigateToURLWithTimeout(net::FilePathToFileURL(filename), 10000, &is_timeout); ASSERT_FALSE(is_timeout); @@ -292,7 +292,7 @@ TEST_F(AutomationProxyTest, DISABLED_NavigateToURLWithTimeout1) { ASSERT_TRUE(tab->GetTabTitle(&title)); ASSERT_STREQ(L"Title Of Awesomeness", title.c_str()); - tab->NavigateToURLWithTimeout(net_util::FilePathToFileURL(filename), + tab->NavigateToURLWithTimeout(net::FilePathToFileURL(filename), 1, &is_timeout); ASSERT_TRUE(is_timeout); @@ -311,13 +311,13 @@ TEST_F(AutomationProxyTest, DISABLED_NavigateToURLWithTimeout2) { file_util::AppendToPath(&filename1, L"title1.html"); bool is_timeout; - tab->NavigateToURLWithTimeout(net_util::FilePathToFileURL(filename1), + tab->NavigateToURLWithTimeout(net::FilePathToFileURL(filename1), 1, &is_timeout); ASSERT_TRUE(is_timeout); std::wstring filename2(test_data_directory_); file_util::AppendToPath(&filename2, L"title2.html"); - tab->NavigateToURLWithTimeout(net_util::FilePathToFileURL(filename2), + tab->NavigateToURLWithTimeout(net::FilePathToFileURL(filename2), 10000, &is_timeout); ASSERT_FALSE(is_timeout); @@ -341,7 +341,7 @@ TEST_F(AutomationProxyTest, GoBackForward) { std::wstring filename(test_data_directory_); file_util::AppendToPath(&filename, L"title2.html"); - ASSERT_TRUE(tab->NavigateToURL(net_util::FilePathToFileURL(filename))); + ASSERT_TRUE(tab->NavigateToURL(net::FilePathToFileURL(filename))); ASSERT_TRUE(tab->GetTabTitle(&title)); ASSERT_STREQ(L"Title Of Awesomeness", title.c_str()); @@ -370,7 +370,7 @@ TEST_F(AutomationProxyTest, GetCurrentURL) { std::wstring filename(test_data_directory_); file_util::AppendToPath(&filename, L"cookie1.html"); - GURL newurl = net_util::FilePathToFileURL(filename); + GURL newurl = net::FilePathToFileURL(filename); ASSERT_TRUE(tab->NavigateToURL(newurl)); ASSERT_TRUE(tab->GetCurrentURL(&url)); // compare canonical urls... @@ -476,7 +476,7 @@ TEST_F(AutomationProxyTest, NavigateToURLAsync) { std::wstring filename(test_data_directory_); file_util::AppendToPath(&filename, L"cookie1.html"); - GURL newurl = net_util::FilePathToFileURL(filename); + GURL newurl = net::FilePathToFileURL(filename); ASSERT_TRUE(tab->NavigateToURLAsync(newurl)); std::string value = WaitUntilCookieNonEmpty(tab.get(), newurl, @@ -664,7 +664,7 @@ TEST_F(AutomationProxyTest, ConstrainedWindowTest) { file_util::AppendToPath(&filename, L"constrained_files"); file_util::AppendToPath(&filename, L"constrained_window.html"); - ASSERT_TRUE(tab->NavigateToURL(net_util::FilePathToFileURL(filename))); + ASSERT_TRUE(tab->NavigateToURL(net::FilePathToFileURL(filename))); int count; ASSERT_TRUE(tab->WaitForChildWindowCountToChange(0, &count, 5000)); @@ -698,7 +698,7 @@ TEST_F(AutomationProxyTest, CantEscapeByOnloadMoveto) { file_util::AppendToPath(&filename, L"constrained_files"); file_util::AppendToPath(&filename, L"constrained_window_onload_moveto.html"); - ASSERT_TRUE(tab->NavigateToURL(net_util::FilePathToFileURL(filename))); + ASSERT_TRUE(tab->NavigateToURL(net::FilePathToFileURL(filename))); int count; ASSERT_TRUE(tab->WaitForChildWindowCountToChange(0, &count, 5000)); diff --git a/chrome/test/page_cycler/page_cycler_test.cc b/chrome/test/page_cycler/page_cycler_test.cc index 421c665..b9a77bd 100644 --- a/chrome/test/page_cycler/page_cycler_test.cc +++ b/chrome/test/page_cycler/page_cycler_test.cc @@ -86,7 +86,7 @@ class PageCyclerTest : public UITest { file_util::AppendToPath(&test_path, L"page_cycler"); file_util::AppendToPath(&test_path, name); file_util::AppendToPath(&test_path, L"start.html"); - test_url = net_util::FilePathToFileURL(test_path); + test_url = net::FilePathToFileURL(test_path); } // run N iterations diff --git a/chrome/test/plugin/plugin_test.cpp b/chrome/test/plugin/plugin_test.cpp index c9f16c1..98a4300 100644 --- a/chrome/test/plugin/plugin_test.cpp +++ b/chrome/test/plugin/plugin_test.cpp @@ -114,7 +114,7 @@ class PluginTest : public UITest { PathService::Get(chrome::DIR_TEST_DATA, &path); file_util::AppendToPath(&path, L"plugin"); file_util::AppendToPath(&path, test_case); - return net_util::FilePathToFileURL(path); + return net::FilePathToFileURL(path); } // Waits for the test case to finish. diff --git a/chrome/test/selenium/selenium_test.cc b/chrome/test/selenium/selenium_test.cc index 043def8..5db6bb1 100644 --- a/chrome/test/selenium/selenium_test.cc +++ b/chrome/test/selenium/selenium_test.cc @@ -125,7 +125,7 @@ class SeleniumTest : public UITest { file_util::AppendToPath(&test_path, L"core"); file_util::AppendToPath(&test_path, L"TestRunner.html"); - GURL test_url(net_util::FilePathToFileURL(test_path)); + GURL test_url(net::FilePathToFileURL(test_path)); scoped_ptr<TabProxy> tab(GetActiveTab()); tab->NavigateToURL(test_url); diff --git a/chrome/test/tab_switching/tab_switching_test.cc b/chrome/test/tab_switching/tab_switching_test.cc index f2c572b..fb16816 100644 --- a/chrome/test/tab_switching/tab_switching_test.cc +++ b/chrome/test/tab_switching/tab_switching_test.cc @@ -148,7 +148,7 @@ class TabSwitchingUITest : public UITest { file_name += files[i]; file_name += file_util::kPathSeparator; file_name += L"index.html"; - browser_proxy_->AppendTab(net_util::FilePathToFileURL(file_name)); + browser_proxy_->AppendTab(net::FilePathToFileURL(file_name)); number_of_new_tabs_opened++; } diff --git a/chrome/test/ui/layout_plugin_uitest.cpp b/chrome/test/ui/layout_plugin_uitest.cpp index 1a3e973..5743580 100644 --- a/chrome/test/ui/layout_plugin_uitest.cpp +++ b/chrome/test/ui/layout_plugin_uitest.cpp @@ -57,7 +57,7 @@ TEST_F(LayoutPluginTester, UnloadNoCrash) { std::wstring path; PathService::Get(chrome::DIR_TEST_DATA, &path); file_util::AppendToPath(&path, L"npapi/layout_test_plugin.html"); - NavigateToURL(net_util::FilePathToFileURL(path)); + NavigateToURL(net::FilePathToFileURL(path)); std::wstring title; TabProxy* tab = GetActiveTab(); diff --git a/chrome/test/ui/npapi_uitest.cpp b/chrome/test/ui/npapi_uitest.cpp index cf81db6..bd292e6 100644 --- a/chrome/test/ui/npapi_uitest.cpp +++ b/chrome/test/ui/npapi_uitest.cpp @@ -101,7 +101,7 @@ protected: PathService::Get(chrome::DIR_TEST_DATA, &path); file_util::AppendToPath(&path, L"npapi"); file_util::AppendToPath(&path, test_case); - return net_util::FilePathToFileURL(path); + return net::FilePathToFileURL(path); } // Waits for the test case to finish. |