diff options
108 files changed, 485 insertions, 399 deletions
diff --git a/chrome/browser/alternate_nav_url_fetcher.h b/chrome/browser/alternate_nav_url_fetcher.h index 785f34a..7f573dd 100644 --- a/chrome/browser/alternate_nav_url_fetcher.h +++ b/chrome/browser/alternate_nav_url_fetcher.h @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -51,7 +51,7 @@ class AlternateNavURLFetcher : public NotificationObserver, // URLFetcher::Delegate virtual void OnURLFetchComplete(const URLFetcher* source, const GURL& url, - const URLRequestStatus& status, + const net::URLRequestStatus& status, int response_code, const ResponseCookies& cookies, const std::string& data); @@ -67,7 +67,7 @@ class AlternateNavURLFetcher : public NotificationObserver, // Sets |state_| to either SUCCEEDED or FAILED depending on the result of the // fetch. void SetStatusFromURLFetch(const GURL& url, - const URLRequestStatus& status, + const net::URLRequestStatus& status, int response_code); // Displays the infobar if all conditions are met (the page has loaded and diff --git a/chrome/browser/appcache/appcache_dispatcher_host.h b/chrome/browser/appcache/appcache_dispatcher_host.h index 3e2dbe9..1feca77 100644 --- a/chrome/browser/appcache/appcache_dispatcher_host.h +++ b/chrome/browser/appcache/appcache_dispatcher_host.h @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -18,9 +18,12 @@ #include "webkit/appcache/appcache_backend_impl.h" class ChromeAppCacheService; -class URLRequestContext; class URLRequestContextGetter; +namespace net { +class URLRequestContext; +} // namespace net + // Handles appcache related messages sent to the main browser process from // its child processes. There is a distinct host for each child process. // Messages are handled on the IO thread. The BrowserRenderProcessHost and @@ -28,7 +31,7 @@ class URLRequestContextGetter; class AppCacheDispatcherHost : public BrowserMessageFilter { public: // Constructor for use on the IO thread. - AppCacheDispatcherHost(URLRequestContext* request_context, + AppCacheDispatcherHost(net::URLRequestContext* request_context, int process_id); // Constructor for use on the UI thread. @@ -77,7 +80,7 @@ class AppCacheDispatcherHost : public BrowserMessageFilter { // Temporary until OnChannelConnected() can be called from the IO thread, // which will extract the AppCacheService from the URLRequestContext. - scoped_refptr<URLRequestContext> request_context_; + scoped_refptr<net::URLRequestContext> request_context_; scoped_refptr<URLRequestContextGetter> request_context_getter_; scoped_ptr<appcache::GetStatusCallback> get_status_callback_; diff --git a/chrome/browser/autocomplete/search_provider.h b/chrome/browser/autocomplete/search_provider.h index 2163336..9b83c3d 100644 --- a/chrome/browser/autocomplete/search_provider.h +++ b/chrome/browser/autocomplete/search_provider.h @@ -70,7 +70,7 @@ class SearchProvider : public AutocompleteProvider, // URLFetcher::Delegate virtual void OnURLFetchComplete(const URLFetcher* source, const GURL& url, - const URLRequestStatus& status, + const net::URLRequestStatus& status, int response_code, const ResponseCookies& cookies, const std::string& data); diff --git a/chrome/browser/autofill/autofill_download.cc b/chrome/browser/autofill/autofill_download.cc index 94d9129..cc7e119 100644 --- a/chrome/browser/autofill/autofill_download.cc +++ b/chrome/browser/autofill/autofill_download.cc @@ -188,12 +188,13 @@ bool AutoFillDownloadManager::StartRequest( return true; } -void AutoFillDownloadManager::OnURLFetchComplete(const URLFetcher* source, - const GURL& url, - const URLRequestStatus& status, - int response_code, - const ResponseCookies& cookies, - const std::string& data) { +void AutoFillDownloadManager::OnURLFetchComplete( + const URLFetcher* source, + const GURL& url, + const net::URLRequestStatus& status, + int response_code, + const ResponseCookies& cookies, + const std::string& data) { std::map<URLFetcher *, FormRequestData>::iterator it = url_fetchers_.find(const_cast<URLFetcher*>(source)); if (it == url_fetchers_.end()) { diff --git a/chrome/browser/autofill/autofill_download.h b/chrome/browser/autofill/autofill_download.h index 488c3b3..8937557 100644 --- a/chrome/browser/autofill/autofill_download.h +++ b/chrome/browser/autofill/autofill_download.h @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -109,7 +109,7 @@ class AutoFillDownloadManager : public URLFetcher::Delegate { // URLFetcher::Delegate implementation: virtual void OnURLFetchComplete(const URLFetcher* source, const GURL& url, - const URLRequestStatus& status, + const net::URLRequestStatus& status, int response_code, const ResponseCookies& cookies, const std::string& data); diff --git a/chrome/browser/automation/url_request_automation_job.h b/chrome/browser/automation/url_request_automation_job.h index 9256a77..f1e1aa1 100644 --- a/chrome/browser/automation/url_request_automation_job.h +++ b/chrome/browser/automation/url_request_automation_job.h @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // This class simulates what wininet does when a dns lookup fails. @@ -83,7 +83,7 @@ class URLRequestAutomationJob : public net::URLRequestJob { // IPC message handlers. void OnRequestStarted(int id, const AutomationURLResponse& response); void OnDataAvailable(int id, const std::string& bytes); - void OnRequestEnd(int id, const URLRequestStatus& status); + void OnRequestEnd(int id, const net::URLRequestStatus& status); private: virtual ~URLRequestAutomationJob(); diff --git a/chrome/browser/chrome_plugin_browsing_context.cc b/chrome/browser/chrome_plugin_browsing_context.cc index 3ff4729..a252bbf 100644 --- a/chrome/browser/chrome_plugin_browsing_context.cc +++ b/chrome/browser/chrome_plugin_browsing_context.cc @@ -23,17 +23,18 @@ CPBrowsingContextManager::~CPBrowsingContextManager() { } CPBrowsingContext CPBrowsingContextManager::Allocate( - URLRequestContext* context) { + net::URLRequestContext* context) { int32 map_id = map_.Add(context); return static_cast<CPBrowsingContext>(map_id); } -URLRequestContext* CPBrowsingContextManager::ToURLRequestContext( +net::URLRequestContext* CPBrowsingContextManager::ToURLRequestContext( CPBrowsingContext id) { return map_.Lookup(static_cast<int32>(id)); } -CPBrowsingContext CPBrowsingContextManager::Lookup(URLRequestContext* context) { +CPBrowsingContext CPBrowsingContextManager::Lookup( + net::URLRequestContext* context) { ReverseMap::const_iterator it = reverse_map_.find(context); if (it == reverse_map_.end()) { CPBrowsingContext id = Allocate(context); @@ -49,7 +50,8 @@ void CPBrowsingContextManager::Observe(NotificationType type, const NotificationDetails& details) { DCHECK(type == NotificationType::URL_REQUEST_CONTEXT_RELEASED); - URLRequestContext* context = Source<URLRequestContext>(source).ptr(); + net::URLRequestContext* context = + Source<net::URLRequestContext>(source).ptr(); // Multiple CPBrowsingContexts may refer to the same URLRequestContext. for (Map::iterator it(&map_); !it.IsAtEnd(); it.Advance()) { diff --git a/chrome/browser/chrome_plugin_browsing_context.h b/chrome/browser/chrome_plugin_browsing_context.h index 45d24f3..9f0eb8f 100644 --- a/chrome/browser/chrome_plugin_browsing_context.h +++ b/chrome/browser/chrome_plugin_browsing_context.h @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -13,7 +13,9 @@ #include "chrome/common/notification_observer.h" #include "chrome/common/notification_registrar.h" +namespace net { class URLRequestContext; +} // namespace net // This class manages the mapping between CPBrowsingContexts and // URLRequestContexts. It observes when URLRequestContexts go away, and @@ -33,16 +35,16 @@ class CPBrowsingContextManager : public NotificationObserver { // Generate a new unique CPBrowsingContext ID from the given // URLRequestContext. Multiple CPBrowsingContexts can map to the same // URLRequestContext. - CPBrowsingContext Allocate(URLRequestContext* context); + CPBrowsingContext Allocate(net::URLRequestContext* context); // Return the URLRequestContext that this CPBrowsingContext refers to, or NULL // if not found. - URLRequestContext* ToURLRequestContext(CPBrowsingContext id); + net::URLRequestContext* ToURLRequestContext(CPBrowsingContext id); // Return a CPBrowsingContext ID that corresponds to the given // URLRequestContext. This function differs from Allocate in that calling // this multiple times with the same argument gives the same ID. - CPBrowsingContext Lookup(URLRequestContext* context); + CPBrowsingContext Lookup(net::URLRequestContext* context); private: // NotificationObserver @@ -50,8 +52,8 @@ class CPBrowsingContextManager : public NotificationObserver { const NotificationSource& source, const NotificationDetails& details); - typedef IDMap<URLRequestContext> Map; - typedef std::map<URLRequestContext*, CPBrowsingContext> ReverseMap; + typedef IDMap<net::URLRequestContext> Map; + typedef std::map<net::URLRequestContext*, CPBrowsingContext> ReverseMap; NotificationRegistrar registrar_; diff --git a/chrome/browser/chromeos/login/apply_services_customization.cc b/chrome/browser/chromeos/login/apply_services_customization.cc index b778a5e..58e8e1d 100644 --- a/chrome/browser/chromeos/login/apply_services_customization.cc +++ b/chrome/browser/chromeos/login/apply_services_customization.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -104,7 +104,7 @@ void ApplyServicesCustomization::StartFileFetch() { void ApplyServicesCustomization::OnURLFetchComplete( const URLFetcher* source, const GURL& url, - const URLRequestStatus& status, + const net::URLRequestStatus& status, int response_code, const ResponseCookies& cookies, const std::string& data) { diff --git a/chrome/browser/chromeos/login/apply_services_customization.h b/chrome/browser/chromeos/login/apply_services_customization.h index 32e7d9a..757ce7c 100644 --- a/chrome/browser/chromeos/login/apply_services_customization.h +++ b/chrome/browser/chromeos/login/apply_services_customization.h @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -43,7 +43,7 @@ class ApplyServicesCustomization : public URLFetcher::Delegate { // Overriden from URLFetcher::Delegate: virtual void OnURLFetchComplete(const URLFetcher* source, const GURL& url, - const URLRequestStatus& status, + const net::URLRequestStatus& status, int response_code, const ResponseCookies& cookies, const std::string& data); diff --git a/chrome/browser/chromeos/login/cookie_fetcher.h b/chrome/browser/chromeos/login/cookie_fetcher.h index 660a1642..f9290f7 100644 --- a/chrome/browser/chromeos/login/cookie_fetcher.h +++ b/chrome/browser/chromeos/login/cookie_fetcher.h @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -47,7 +47,7 @@ class CookieFetcher : public URLFetcher::Delegate { // Overloaded from URLFetcher::Delegate. virtual void OnURLFetchComplete(const URLFetcher* source, const GURL& url, - const URLRequestStatus& status, + const net::URLRequestStatus& status, int response_code, const ResponseCookies& cookies, const std::string& data); diff --git a/chrome/browser/chromeos/login/image_downloader.cc b/chrome/browser/chromeos/login/image_downloader.cc index 943b9e9..4a6c0b5 100644 --- a/chrome/browser/chromeos/login/image_downloader.cc +++ b/chrome/browser/chromeos/login/image_downloader.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -40,7 +40,7 @@ ImageDownloader::ImageDownloader(ImageDecoder::Delegate* delegate, void ImageDownloader::OnURLFetchComplete(const URLFetcher* source, const GURL& url, - const URLRequestStatus& status, + const net::URLRequestStatus& status, int response_code, const ResponseCookies& cookies, const std::string& data) { diff --git a/chrome/browser/chromeos/login/image_downloader.h b/chrome/browser/chromeos/login/image_downloader.h index 06193bf..31ab2a7 100644 --- a/chrome/browser/chromeos/login/image_downloader.h +++ b/chrome/browser/chromeos/login/image_downloader.h @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -31,7 +31,7 @@ class ImageDownloader : public URLFetcher::Delegate { // Overriden from URLFetcher::Delegate: virtual void OnURLFetchComplete(const URLFetcher* source, const GURL& url, - const URLRequestStatus& status, + const net::URLRequestStatus& status, int response_code, const ResponseCookies& cookies, const std::string& data); diff --git a/chrome/browser/chromeos/login/mock_auth_response_handler.h b/chrome/browser/chromeos/login/mock_auth_response_handler.h index db4651a..7b82cb8 100644 --- a/chrome/browser/chromeos/login/mock_auth_response_handler.h +++ b/chrome/browser/chromeos/login/mock_auth_response_handler.h @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -28,7 +28,7 @@ namespace chromeos { class MockAuthResponseHandler : public AuthResponseHandler { public: MockAuthResponseHandler(const GURL& url, - const URLRequestStatus& status, + const net::URLRequestStatus& status, const int code, const std::string& data); virtual ~MockAuthResponseHandler() {} @@ -41,13 +41,13 @@ class MockAuthResponseHandler : public AuthResponseHandler { private: const GURL remote_; - const URLRequestStatus status_; + const net::URLRequestStatus status_; const int http_response_code_; const std::string data_; static void CompleteFetch(URLFetcher::Delegate* delegate, const GURL remote, - const URLRequestStatus status, + const net::URLRequestStatus status, const int http_response_code, const std::string data); diff --git a/chrome/browser/chromeos/login/user_image_downloader.cc b/chrome/browser/chromeos/login/user_image_downloader.cc index 2efa796..b3da66a 100644 --- a/chrome/browser/chromeos/login/user_image_downloader.cc +++ b/chrome/browser/chromeos/login/user_image_downloader.cc @@ -57,12 +57,13 @@ UserImageDownloader::UserImageDownloader(const std::string& username, UserImageDownloader::~UserImageDownloader() { } -void UserImageDownloader::OnURLFetchComplete(const URLFetcher* source, - const GURL& url, - const URLRequestStatus& status, - int response_code, - const ResponseCookies& cookies, - const std::string& data) { +void UserImageDownloader::OnURLFetchComplete( + const URLFetcher* source, + const GURL& url, + const net::URLRequestStatus& status, + int response_code, + const ResponseCookies& cookies, + const std::string& data) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); if (response_code != 200) { LOG(ERROR) << "Response code is " << response_code; diff --git a/chrome/browser/chromeos/login/user_image_downloader.h b/chrome/browser/chromeos/login/user_image_downloader.h index 5eba206..d5dacc4 100644 --- a/chrome/browser/chromeos/login/user_image_downloader.h +++ b/chrome/browser/chromeos/login/user_image_downloader.h @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -37,7 +37,7 @@ class UserImageDownloader : public URLFetcher::Delegate, // Overriden from URLFetcher::Delegate: virtual void OnURLFetchComplete(const URLFetcher* source, const GURL& url, - const URLRequestStatus& status, + const net::URLRequestStatus& status, int response_code, const ResponseCookies& cookies, const std::string& data); diff --git a/chrome/browser/extensions/extension_updater.h b/chrome/browser/extensions/extension_updater.h index d9e6a3e..3d7986c 100644 --- a/chrome/browser/extensions/extension_updater.h +++ b/chrome/browser/extensions/extension_updater.h @@ -204,18 +204,18 @@ class ExtensionUpdater // URLFetcher::Delegate interface. virtual void OnURLFetchComplete(const URLFetcher* source, const GURL& url, - const URLRequestStatus& status, + const net::URLRequestStatus& status, int response_code, const ResponseCookies& cookies, const std::string& data); // These do the actual work when a URL fetch completes. virtual void OnManifestFetchComplete(const GURL& url, - const URLRequestStatus& status, + const net::URLRequestStatus& status, int response_code, const std::string& data); virtual void OnCRXFetchComplete(const GURL& url, - const URLRequestStatus& status, + const net::URLRequestStatus& status, int response_code, const std::string& data); diff --git a/chrome/browser/file_system/file_system_dispatcher_host.h b/chrome/browser/file_system/file_system_dispatcher_host.h index ab57d09..865ef70 100644 --- a/chrome/browser/file_system/file_system_dispatcher_host.h +++ b/chrome/browser/file_system/file_system_dispatcher_host.h @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -23,9 +23,12 @@ class HostContentSettingsMap; class Profile; class Receiver; class RenderMessageFilter; -class URLRequestContext; class URLRequestContextGetter; +namespace net { +class URLRequestContext; +} // namespace net + namespace fileapi { class SandboxedFileSystemContext; class SandboxedFileSystemOperation; @@ -93,7 +96,7 @@ class FileSystemDispatcherHost : public BrowserMessageFilter { // This holds the URLRequestContextGetter until Init() can be called from the // IO thread, which will extract the URLRequestContext from it. scoped_refptr<URLRequestContextGetter> request_context_getter_; - scoped_refptr<URLRequestContext> request_context_; + scoped_refptr<net::URLRequestContext> request_context_; DISALLOW_COPY_AND_ASSIGN(FileSystemDispatcherHost); }; diff --git a/chrome/browser/geolocation/network_location_request.h b/chrome/browser/geolocation/network_location_request.h index f7c8a0c..90bc026 100644 --- a/chrome/browser/geolocation/network_location_request.h +++ b/chrome/browser/geolocation/network_location_request.h @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -64,7 +64,7 @@ class NetworkLocationRequest : private URLFetcher::Delegate { // URLFetcher::Delegate virtual void OnURLFetchComplete(const URLFetcher* source, const GURL& url, - const URLRequestStatus& status, + const net::URLRequestStatus& status, int response_code, const ResponseCookies& cookies, const std::string& data); diff --git a/chrome/browser/google/google_url_tracker.h b/chrome/browser/google/google_url_tracker.h index 590c6df..7f58ab1 100644 --- a/chrome/browser/google/google_url_tracker.h +++ b/chrome/browser/google/google_url_tracker.h @@ -108,7 +108,7 @@ class GoogleURLTracker : public URLFetcher::Delegate, // URLFetcher::Delegate virtual void OnURLFetchComplete(const URLFetcher *source, const GURL& url, - const URLRequestStatus& status, + const net::URLRequestStatus& status, int response_code, const ResponseCookies& cookies, const std::string& data); diff --git a/chrome/browser/importer/toolbar_importer.cc b/chrome/browser/importer/toolbar_importer.cc index cc3411c..adcea0c 100644 --- a/chrome/browser/importer/toolbar_importer.cc +++ b/chrome/browser/importer/toolbar_importer.cc @@ -135,7 +135,7 @@ void Toolbar5Importer::Cancel() { void Toolbar5Importer::OnURLFetchComplete( const URLFetcher* source, const GURL& url, - const URLRequestStatus& status, + const net::URLRequestStatus& status, int response_code, const ResponseCookies& cookies, const std::string& data) { diff --git a/chrome/browser/importer/toolbar_importer.h b/chrome/browser/importer/toolbar_importer.h index f83135a..e0b87e5 100644 --- a/chrome/browser/importer/toolbar_importer.h +++ b/chrome/browser/importer/toolbar_importer.h @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -54,7 +54,7 @@ class Toolbar5Importer : public URLFetcher::Delegate, public Importer { // URLFetcher::Delegate method called back from the URLFetcher object. virtual void OnURLFetchComplete(const URLFetcher* source, const GURL& url, - const URLRequestStatus& status, + const net::URLRequestStatus& status, int response_code, const ResponseCookies& cookies, const std::string& data); diff --git a/chrome/browser/intranet_redirect_detector.h b/chrome/browser/intranet_redirect_detector.h index 1861dce..5e920cf 100644 --- a/chrome/browser/intranet_redirect_detector.h +++ b/chrome/browser/intranet_redirect_detector.h @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -71,7 +71,7 @@ class IntranetRedirectDetector : public URLFetcher::Delegate, // URLFetcher::Delegate virtual void OnURLFetchComplete(const URLFetcher* source, const GURL& url, - const URLRequestStatus& status, + const net::URLRequestStatus& status, int response_code, const ResponseCookies& cookies, const std::string& data); diff --git a/chrome/browser/io_thread.h b/chrome/browser/io_thread.h index 2f47a42..3d34538 100644 --- a/chrome/browser/io_thread.h +++ b/chrome/browser/io_thread.h @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -21,7 +21,6 @@ class ChromeURLRequestContextGetter; class ListValue; class PrefService; class PrerenderInterceptor; -class URLRequestContext; namespace chrome_browser_net { class ConnectInterceptor; @@ -38,6 +37,7 @@ class HttpTransactionFactory; class ProxyScriptFetcher; class ProxyService; class SSLConfigService; +class URLRequestContext; class URLSecurityManager; } // namespace net @@ -58,7 +58,7 @@ class IOThread : public BrowserProcessSubThread { proxy_script_fetcher_http_transaction_factory; scoped_ptr<net::URLSecurityManager> url_security_manager; ChromeNetworkDelegate network_delegate; - scoped_refptr<URLRequestContext> proxy_script_fetcher_context; + scoped_refptr<net::URLRequestContext> proxy_script_fetcher_context; }; // |net_log| must either outlive the IOThread or be NULL. diff --git a/chrome/browser/metrics/metrics_service.h b/chrome/browser/metrics/metrics_service.h index fa15a12..a4bee94 100644 --- a/chrome/browser/metrics/metrics_service.h +++ b/chrome/browser/metrics/metrics_service.h @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -274,7 +274,7 @@ class MetricsService : public NotificationObserver, // completes (either successfully or with failure). virtual void OnURLFetchComplete(const URLFetcher* source, const GURL& url, - const URLRequestStatus& status, + const net::URLRequestStatus& status, int response_code, const ResponseCookies& cookies, const std::string& data); diff --git a/chrome/browser/net/chrome_url_request_context.h b/chrome/browser/net/chrome_url_request_context.h index 8d1377b..93f0e37 100644 --- a/chrome/browser/net/chrome_url_request_context.h +++ b/chrome/browser/net/chrome_url_request_context.h @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -45,7 +45,7 @@ class ChromeURLRequestContextFactory; // // All methods of this class must be called from the IO thread, // including the constructor and destructor. -class ChromeURLRequestContext : public URLRequestContext { +class ChromeURLRequestContext : public net::URLRequestContext { public: ChromeURLRequestContext(); @@ -214,7 +214,7 @@ class ChromeURLRequestContextGetter : public URLRequestContextGetter, // GetIOMessageLoopProxy however can be called from any thread. // // URLRequestContextGetter implementation. - virtual URLRequestContext* GetURLRequestContext(); + virtual net::URLRequestContext* GetURLRequestContext(); virtual net::CookieStore* GetCookieStore(); virtual scoped_refptr<base::MessageLoopProxy> GetIOMessageLoopProxy() const; @@ -301,7 +301,7 @@ class ChromeURLRequestContextGetter : public URLRequestContextGetter, // NULL if not yet initialized. Otherwise, it is the URLRequestContext // instance that was lazilly created by GetURLRequestContext. // Access only from the IO thread. - scoped_refptr<URLRequestContext> url_request_context_; + scoped_refptr<net::URLRequestContext> url_request_context_; DISALLOW_COPY_AND_ASSIGN(ChromeURLRequestContextGetter); }; diff --git a/chrome/browser/net/connection_tester.h b/chrome/browser/net/connection_tester.h index 1d206ac..dd6715d 100644 --- a/chrome/browser/net/connection_tester.h +++ b/chrome/browser/net/connection_tester.h @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -13,7 +13,9 @@ #include "googleurl/src/gurl.h" #include "net/base/completion_callback.h" +namespace net { class URLRequestContext; +} // namespace net // ConnectionTester runs a suite of tests (also called "experiments"), // to try and discover why loading a particular URL is failing with an error @@ -126,7 +128,7 @@ class ConnectionTester { // |delegate| is owned by the caller, and must remain valid for the lifetime // of ConnectionTester. ConnectionTester(Delegate* delegate, - URLRequestContext* proxy_request_context); + net::URLRequestContext* proxy_request_context); // Note that destruction cancels any in-progress tests. ~ConnectionTester(); @@ -172,7 +174,7 @@ class ConnectionTester { // of the list is the one currently in progress. ExperimentList remaining_experiments_; - const scoped_refptr<URLRequestContext> proxy_request_context_; + const scoped_refptr<net::URLRequestContext> proxy_request_context_; DISALLOW_COPY_AND_ASSIGN(ConnectionTester); }; diff --git a/chrome/browser/net/sdch_dictionary_fetcher.h b/chrome/browser/net/sdch_dictionary_fetcher.h index 32bf0d7..0240245 100644 --- a/chrome/browser/net/sdch_dictionary_fetcher.h +++ b/chrome/browser/net/sdch_dictionary_fetcher.h @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -52,7 +52,7 @@ class SdchDictionaryFetcher : public URLFetcher::Delegate, // completes (either successfully or with failure). virtual void OnURLFetchComplete(const URLFetcher* source, const GURL& url, - const URLRequestStatus& status, + const net::URLRequestStatus& status, int response_code, const ResponseCookies& cookies, const std::string& data); diff --git a/chrome/browser/net/websocket_experiment/websocket_experiment_task.cc b/chrome/browser/net/websocket_experiment/websocket_experiment_task.cc index f116119..09cccc7 100644 --- a/chrome/browser/net/websocket_experiment/websocket_experiment_task.cc +++ b/chrome/browser/net/websocket_experiment/websocket_experiment_task.cc @@ -295,7 +295,7 @@ void WebSocketExperimentTask::SaveResult() const { void WebSocketExperimentTask::OnURLFetchComplete( const URLFetcher* source, const GURL& url, - const URLRequestStatus& status, + const net::URLRequestStatus& status, int response_code, const ResponseCookies& cookies, const std::string& data) { diff --git a/chrome/browser/net/websocket_experiment/websocket_experiment_task.h b/chrome/browser/net/websocket_experiment/websocket_experiment_task.h index c1fe41c..b23c0a0 100644 --- a/chrome/browser/net/websocket_experiment/websocket_experiment_task.h +++ b/chrome/browser/net/websocket_experiment/websocket_experiment_task.h @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // @@ -147,7 +147,7 @@ class WebSocketExperimentTask : public URLFetcher::Delegate, // URLFetcher::Delegate method. virtual void OnURLFetchComplete(const URLFetcher* source, const GURL& url, - const URLRequestStatus& status, + const net::URLRequestStatus& status, int response_code, const ResponseCookies& cookies, const std::string& data); diff --git a/chrome/browser/plugin_download_helper.cc b/chrome/browser/plugin_download_helper.cc index 0d85e27..e9d306c 100644 --- a/chrome/browser/plugin_download_helper.cc +++ b/chrome/browser/plugin_download_helper.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -34,7 +34,7 @@ PluginDownloadUrlHelper::~PluginDownloadUrlHelper() { } void PluginDownloadUrlHelper::InitiateDownload( - URLRequestContext* request_context) { + net::URLRequestContext* request_context) { download_file_request_ = new net::URLRequest(GURL(download_url_), this); chrome_browser_net::SetOriginProcessUniqueIDForRequest( download_source_child_unique_id_, download_file_request_); diff --git a/chrome/browser/plugin_download_helper.h b/chrome/browser/plugin_download_helper.h index cccf3f0..63b24be 100644 --- a/chrome/browser/plugin_download_helper.h +++ b/chrome/browser/plugin_download_helper.h @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -36,7 +36,7 @@ class PluginDownloadUrlHelper : public net::URLRequest::Delegate { PluginDownloadUrlHelper::DownloadDelegate* delegate); ~PluginDownloadUrlHelper(); - void InitiateDownload(URLRequestContext* request_context); + void InitiateDownload(net::URLRequestContext* request_context); // net::URLRequest::Delegate virtual void OnAuthRequired(net::URLRequest* request, diff --git a/chrome/browser/plugin_service.h b/chrome/browser/plugin_service.h index 8494fda..d24c4e2 100644 --- a/chrome/browser/plugin_service.h +++ b/chrome/browser/plugin_service.h @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -40,8 +40,10 @@ class Message; class MessageLoop; class Profile; class ResourceDispatcherHost; -class URLRequestContext; +namespace net { +class URLRequestContext; +} // namespace net namespace webkit { namespace npapi { diff --git a/chrome/browser/policy/device_management_service.h b/chrome/browser/policy/device_management_service.h index eab4c21..76a3520 100644 --- a/chrome/browser/policy/device_management_service.h +++ b/chrome/browser/policy/device_management_service.h @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -34,10 +34,10 @@ class DeviceManagementService : public URLFetcher::Delegate { virtual ~DeviceManagementJob() {} // Handles the URL request response. - virtual void HandleResponse(const URLRequestStatus& status, - int response_code, - const ResponseCookies& cookies, - const std::string& data) = 0; + virtual void HandleResponse(const net::URLRequestStatus& status, + int response_code, + const ResponseCookies& cookies, + const std::string& data) = 0; // Gets the URL to contact. virtual GURL GetURL(const std::string& server_url) = 0; @@ -79,7 +79,7 @@ class DeviceManagementService : public URLFetcher::Delegate { // URLFetcher::Delegate override. virtual void OnURLFetchComplete(const URLFetcher* source, const GURL& url, - const URLRequestStatus& status, + const net::URLRequestStatus& status, int response_code, const ResponseCookies& cookies, const std::string& data); diff --git a/chrome/browser/remoting/directory_add_request.h b/chrome/browser/remoting/directory_add_request.h index 2ec6ed2..c87cbf2 100644 --- a/chrome/browser/remoting/directory_add_request.h +++ b/chrome/browser/remoting/directory_add_request.h @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -55,7 +55,7 @@ class DirectoryAddRequest : public URLFetcher::Delegate { // URLFetcher::Delegate implementation. virtual void OnURLFetchComplete(const URLFetcher* source, const GURL& url, - const URLRequestStatus& status, + const net::URLRequestStatus& status, int response_code, const ResponseCookies& cookies, const std::string& data); diff --git a/chrome/browser/renderer_host/async_resource_handler.h b/chrome/browser/renderer_host/async_resource_handler.h index 2b0df7d..d5fa704 100644 --- a/chrome/browser/renderer_host/async_resource_handler.h +++ b/chrome/browser/renderer_host/async_resource_handler.h @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -33,7 +33,7 @@ class AsyncResourceHandler : public ResourceHandler { int min_size); virtual bool OnReadCompleted(int request_id, int* bytes_read); virtual bool OnResponseCompleted(int request_id, - const URLRequestStatus& status, + const net::URLRequestStatus& status, const std::string& security_info); virtual void OnRequestClosed(); virtual void OnDataDownloaded(int request_id, int bytes_downloaded); diff --git a/chrome/browser/renderer_host/buffered_resource_handler.h b/chrome/browser/renderer_host/buffered_resource_handler.h index 05cbd48..029db3f 100644 --- a/chrome/browser/renderer_host/buffered_resource_handler.h +++ b/chrome/browser/renderer_host/buffered_resource_handler.h @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -34,7 +34,7 @@ class BufferedResourceHandler : public ResourceHandler { int min_size); virtual bool OnReadCompleted(int request_id, int* bytes_read); virtual bool OnResponseCompleted(int request_id, - const URLRequestStatus& status, + const net::URLRequestStatus& status, const std::string& security_info); virtual void OnRequestClosed(); diff --git a/chrome/browser/renderer_host/cross_site_resource_handler.h b/chrome/browser/renderer_host/cross_site_resource_handler.h index 33c1109..00006bf 100644 --- a/chrome/browser/renderer_host/cross_site_resource_handler.h +++ b/chrome/browser/renderer_host/cross_site_resource_handler.h @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -35,7 +35,7 @@ class CrossSiteResourceHandler : public ResourceHandler { int min_size); virtual bool OnReadCompleted(int request_id, int* bytes_read); virtual bool OnResponseCompleted(int request_id, - const URLRequestStatus& status, + const net::URLRequestStatus& status, const std::string& security_info); virtual void OnRequestClosed(); @@ -60,7 +60,7 @@ class CrossSiteResourceHandler : public ResourceHandler { bool in_cross_site_transition_; int request_id_; bool completed_during_transition_; - URLRequestStatus completed_status_; + net::URLRequestStatus completed_status_; std::string completed_security_info_; ResourceResponse* response_; ResourceDispatcherHost* rdh_; diff --git a/chrome/browser/renderer_host/download_resource_handler.h b/chrome/browser/renderer_host/download_resource_handler.h index 5a66f66..bc26989 100644 --- a/chrome/browser/renderer_host/download_resource_handler.h +++ b/chrome/browser/renderer_host/download_resource_handler.h @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -56,7 +56,7 @@ class DownloadResourceHandler : public ResourceHandler, virtual bool OnReadCompleted(int request_id, int* bytes_read); virtual bool OnResponseCompleted(int request_id, - const URLRequestStatus& status, + const net::URLRequestStatus& status, const std::string& security_info); virtual void OnRequestClosed(); diff --git a/chrome/browser/renderer_host/download_throttling_resource_handler.h b/chrome/browser/renderer_host/download_throttling_resource_handler.h index 22de040..355bee1 100644 --- a/chrome/browser/renderer_host/download_throttling_resource_handler.h +++ b/chrome/browser/renderer_host/download_throttling_resource_handler.h @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -51,7 +51,7 @@ class DownloadThrottlingResourceHandler int min_size); virtual bool OnReadCompleted(int request_id, int* bytes_read); virtual bool OnResponseCompleted(int request_id, - const URLRequestStatus& status, + const net::URLRequestStatus& status, const std::string& security_info); virtual void OnRequestClosed(); diff --git a/chrome/browser/renderer_host/offline_resource_handler.h b/chrome/browser/renderer_host/offline_resource_handler.h index eb19072..82f15a9 100644 --- a/chrome/browser/renderer_host/offline_resource_handler.h +++ b/chrome/browser/renderer_host/offline_resource_handler.h @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -40,7 +40,7 @@ class OfflineResourceHandler : public ResourceHandler, int min_size); virtual bool OnReadCompleted(int request_id, int* bytes_read); virtual bool OnResponseCompleted(int request_id, - const URLRequestStatus& status, + const net::URLRequestStatus& status, const std::string& security_info); virtual void OnRequestClosed(); diff --git a/chrome/browser/renderer_host/redirect_to_file_resource_handler.h b/chrome/browser/renderer_host/redirect_to_file_resource_handler.h index 5e8624a..2d7ceed 100644 --- a/chrome/browser/renderer_host/redirect_to_file_resource_handler.h +++ b/chrome/browser/renderer_host/redirect_to_file_resource_handler.h @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -44,7 +44,7 @@ class RedirectToFileResourceHandler : public ResourceHandler { int min_size); virtual bool OnReadCompleted(int request_id, int* bytes_read); virtual bool OnResponseCompleted(int request_id, - const URLRequestStatus& status, + const net::URLRequestStatus& status, const std::string& security_info); virtual void OnRequestClosed(); diff --git a/chrome/browser/renderer_host/resource_dispatcher_host.h b/chrome/browser/renderer_host/resource_dispatcher_host.h index b48d906..cbd62c2 100644 --- a/chrome/browser/renderer_host/resource_dispatcher_host.h +++ b/chrome/browser/renderer_host/resource_dispatcher_host.h @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -42,13 +42,16 @@ class SafeBrowsingService; class SaveFileManager; class SSLClientAuthHandler; class UserScriptListener; -class URLRequestContext; class WebKitThread; struct DownloadSaveInfo; struct GlobalRequestID; struct ViewHostMsg_Resource_Request; struct ViewMsg_ClosePage_Params; +namespace net { +class URLRequestContext; +} // namespace net + namespace webkit_blob { class DeletableFileReference; } @@ -91,7 +94,7 @@ class ResourceDispatcherHost : public net::URLRequest::Delegate { bool prompt_for_save_location, int process_unique_id, int route_id, - URLRequestContext* request_context); + net::URLRequestContext* request_context); // Initiates a save file from the browser process (as opposed to a resource // request from the renderer or another child process). @@ -99,7 +102,7 @@ class ResourceDispatcherHost : public net::URLRequest::Delegate { const GURL& referrer, int process_unique_id, int route_id, - URLRequestContext* request_context); + net::URLRequestContext* request_context); // Cancels the given request if it still exists. We ignore cancels from the // renderer in the event of a download. diff --git a/chrome/browser/renderer_host/resource_handler.h b/chrome/browser/renderer_host/resource_handler.h index bc05b17..c231406 100644 --- a/chrome/browser/renderer_host/resource_handler.h +++ b/chrome/browser/renderer_host/resource_handler.h @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -19,11 +19,11 @@ namespace net { class IOBuffer; -} +class URLRequestStatus; +} // namespace net struct ResourceResponse; class GURL; -class URLRequestStatus; // The resource dispatcher host uses this interface to push load events to the // renderer, allowing for differences in the types of IPC messages generated. @@ -73,7 +73,7 @@ class ResourceHandler // The response is complete. The final response status is given. // Returns false if the handler is deferring the call to a later time. virtual bool OnResponseCompleted(int request_id, - const URLRequestStatus& status, + const net::URLRequestStatus& status, const std::string& security_info) = 0; // Signals that the request is closed (i.e. finished successfully, cancelled). diff --git a/chrome/browser/renderer_host/resource_message_filter.h b/chrome/browser/renderer_host/resource_message_filter.h index 69af8a9..471c60a 100644 --- a/chrome/browser/renderer_host/resource_message_filter.h +++ b/chrome/browser/renderer_host/resource_message_filter.h @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -12,7 +12,10 @@ class ChromeURLRequestContext; class ResourceDispatcherHost; + +namespace net { class URLRequestContext; +} // namespace net // This class filters out incoming IPC messages for network requests and // processes them on the IPC thread. As a result, network requests are not @@ -27,7 +30,7 @@ class ResourceMessageFilter : public BrowserMessageFilter { public: URLRequestContextOverride() {} - virtual URLRequestContext* GetRequestContext( + virtual net::URLRequestContext* GetRequestContext( uint32 request_id, ResourceType::Type resource_type) = 0; protected: diff --git a/chrome/browser/renderer_host/resource_request_details.h b/chrome/browser/renderer_host/resource_request_details.h index 49f716d..f11a77a 100644 --- a/chrome/browser/renderer_host/resource_request_details.h +++ b/chrome/browser/renderer_host/resource_request_details.h @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -36,7 +36,7 @@ class ResourceRequestDetails { bool has_upload() const { return has_upload_; } int load_flags() const { return load_flags_; } int origin_child_id() const { return origin_child_id_; } - const URLRequestStatus& status() const { return status_; } + const net::URLRequestStatus& status() const { return status_; } int ssl_cert_id() const { return ssl_cert_id_; } int ssl_cert_status() const { return ssl_cert_status_; } ResourceType::Type resource_type() const { return resource_type_; } @@ -51,7 +51,7 @@ class ResourceRequestDetails { bool has_upload_; int load_flags_; int origin_child_id_; - URLRequestStatus status_; + net::URLRequestStatus status_; int ssl_cert_id_; int ssl_cert_status_; ResourceType::Type resource_type_; diff --git a/chrome/browser/renderer_host/safe_browsing_resource_handler.h b/chrome/browser/renderer_host/safe_browsing_resource_handler.h index 724297f..723a32b 100644 --- a/chrome/browser/renderer_host/safe_browsing_resource_handler.h +++ b/chrome/browser/renderer_host/safe_browsing_resource_handler.h @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -58,7 +58,7 @@ class SafeBrowsingResourceHandler : public ResourceHandler, int min_size); virtual bool OnReadCompleted(int request_id, int* bytes_read); virtual bool OnResponseCompleted(int request_id, - const URLRequestStatus& status, + const net::URLRequestStatus& status, const std::string& security_info); virtual void OnRequestClosed(); diff --git a/chrome/browser/renderer_host/save_file_resource_handler.h b/chrome/browser/renderer_host/save_file_resource_handler.h index 7475bef..3519eb1 100644 --- a/chrome/browser/renderer_host/save_file_resource_handler.h +++ b/chrome/browser/renderer_host/save_file_resource_handler.h @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -44,7 +44,7 @@ class SaveFileResourceHandler : public ResourceHandler { virtual bool OnReadCompleted(int request_id, int* bytes_read); virtual bool OnResponseCompleted(int request_id, - const URLRequestStatus& status, + const net::URLRequestStatus& status, const std::string& security_info); virtual void OnRequestClosed(); diff --git a/chrome/browser/renderer_host/socket_stream_dispatcher_host.h b/chrome/browser/renderer_host/socket_stream_dispatcher_host.h index b57d7ce..5c1b47ce 100644 --- a/chrome/browser/renderer_host/socket_stream_dispatcher_host.h +++ b/chrome/browser/renderer_host/socket_stream_dispatcher_host.h @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -54,7 +54,7 @@ class SocketStreamDispatcherHost : public BrowserMessageFilter, void DeleteSocketStreamHost(int socket_id); // Returns the URLRequestContext. - URLRequestContext* GetURLRequestContext(); + net::URLRequestContext* GetURLRequestContext(); IDMap<SocketStreamHost> hosts_; scoped_refptr<ResourceMessageFilter::URLRequestContextOverride> diff --git a/chrome/browser/renderer_host/socket_stream_host.h b/chrome/browser/renderer_host/socket_stream_host.h index 06b3e9f..50afad2 100644 --- a/chrome/browser/renderer_host/socket_stream_host.h +++ b/chrome/browser/renderer_host/socket_stream_host.h @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -12,11 +12,11 @@ #include "net/socket_stream/socket_stream.h" class GURL; -class URLRequestContext; namespace net { class SocketStreamJob; -} +class URLRequestContext; +} // namespace net // Host of SocketStreamHandle. // Each SocketStreamHandle will have an unique socket_id assigned by @@ -37,7 +37,7 @@ class SocketStreamHost { int socket_id() const { return socket_id_; } // Starts to open connection to |url|. - void Connect(const GURL& url, URLRequestContext* request_context); + void Connect(const GURL& url, net::URLRequestContext* request_context); // Sends |data| over the socket stream. // socket stream must be open to send data. diff --git a/chrome/browser/renderer_host/sync_resource_handler.h b/chrome/browser/renderer_host/sync_resource_handler.h index 174d1d8..d0e3d5c 100644 --- a/chrome/browser/renderer_host/sync_resource_handler.h +++ b/chrome/browser/renderer_host/sync_resource_handler.h @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -40,7 +40,7 @@ class SyncResourceHandler : public ResourceHandler { int min_size); virtual bool OnReadCompleted(int request_id, int* bytes_read); virtual bool OnResponseCompleted(int request_id, - const URLRequestStatus& status, + const net::URLRequestStatus& status, const std::string& security_info); virtual void OnRequestClosed(); diff --git a/chrome/browser/renderer_host/x509_user_cert_resource_handler.h b/chrome/browser/renderer_host/x509_user_cert_resource_handler.h index 8ae25f8..1c20cce 100644 --- a/chrome/browser/renderer_host/x509_user_cert_resource_handler.h +++ b/chrome/browser/renderer_host/x509_user_cert_resource_handler.h @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -14,10 +14,10 @@ namespace net { class URLRequest; +class URLRequestStatus; } // namespace net class ResourceDispatcherHost; -class URLRequestStatus; struct DownloadBuffer; // This class handles the "application/x-x509-user-cert" mime-type @@ -51,7 +51,7 @@ class X509UserCertResourceHandler : public ResourceHandler { // Done downloading the certificate. virtual bool OnResponseCompleted(int request_id, - const URLRequestStatus& urs, + const net::URLRequestStatus& urs, const std::string& sec_info); virtual void OnRequestClosed(); diff --git a/chrome/browser/safe_browsing/client_side_detection_service.h b/chrome/browser/safe_browsing/client_side_detection_service.h index 41c87f6..7e048e5 100644 --- a/chrome/browser/safe_browsing/client_side_detection_service.h +++ b/chrome/browser/safe_browsing/client_side_detection_service.h @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // @@ -35,7 +35,10 @@ class SkBitmap; class URLRequestContextGetter; + +namespace net { class URLRequestStatus; +} // namespace net namespace safe_browsing { @@ -58,7 +61,7 @@ class ClientSideDetectionService : public URLFetcher::Delegate { // From the URLFetcher::Delegate interface. virtual void OnURLFetchComplete(const URLFetcher* source, const GURL& url, - const URLRequestStatus& status, + const net::URLRequestStatus& status, int response_code, const ResponseCookies& cookies, const std::string& data); @@ -149,7 +152,7 @@ class ClientSideDetectionService : public URLFetcher::Delegate { // model. void HandleModelResponse(const URLFetcher* source, const GURL& url, - const URLRequestStatus& status, + const net::URLRequestStatus& status, int response_code, const ResponseCookies& cookies, const std::string& data); @@ -158,7 +161,7 @@ class ClientSideDetectionService : public URLFetcher::Delegate { // sending the client-side phishing request. void HandlePhishingVerdict(const URLFetcher* source, const GURL& url, - const URLRequestStatus& status, + const net::URLRequestStatus& status, int response_code, const ResponseCookies& cookies, const std::string& data); diff --git a/chrome/browser/safe_browsing/protocol_manager.h b/chrome/browser/safe_browsing/protocol_manager.h index 173a496..7205b53 100644 --- a/chrome/browser/safe_browsing/protocol_manager.h +++ b/chrome/browser/safe_browsing/protocol_manager.h @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -27,7 +27,9 @@ #include "chrome/browser/safe_browsing/safe_browsing_util.h" #include "chrome/common/net/url_fetcher.h" +namespace net { class URLRequestStatus; +} // namespace net #if defined(COMPILER_GCC) // Allows us to use URLFetchers in a hash_map with gcc (MSVC is okay without @@ -103,7 +105,7 @@ class SafeBrowsingProtocolManager : public URLFetcher::Delegate { // URLFetcher::Delegate interface. virtual void OnURLFetchComplete(const URLFetcher* source, const GURL& url, - const URLRequestStatus& status, + const net::URLRequestStatus& status, int response_code, const ResponseCookies& cookies, const std::string& data); diff --git a/chrome/browser/speech/speech_recognition_request.h b/chrome/browser/speech/speech_recognition_request.h index d6e9566..c12fc4d 100644 --- a/chrome/browser/speech/speech_recognition_request.h +++ b/chrome/browser/speech/speech_recognition_request.h @@ -1,9 +1,10 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef CHROME_BROWSER_SPEECH_SPEECH_RECOGNITION_REQUEST_H_ #define CHROME_BROWSER_SPEECH_SPEECH_RECOGNITION_REQUEST_H_ +#pragma once #include <string> #include "base/basictypes.h" @@ -55,7 +56,7 @@ class SpeechRecognitionRequest : public URLFetcher::Delegate { // URLFetcher::Delegate methods. virtual void OnURLFetchComplete(const URLFetcher* source, const GURL& url, - const URLRequestStatus& status, + const net::URLRequestStatus& status, int response_code, const ResponseCookies& cookies, const std::string& data); diff --git a/chrome/browser/spellcheck_host.cc b/chrome/browser/spellcheck_host.cc index b2932b3..7a5ffa6 100644 --- a/chrome/browser/spellcheck_host.cc +++ b/chrome/browser/spellcheck_host.cc @@ -255,7 +255,7 @@ void SpellCheckHost::WriteWordToCustomDictionary(const std::string& word) { void SpellCheckHost::OnURLFetchComplete(const URLFetcher* source, const GURL& url, - const URLRequestStatus& status, + const net::URLRequestStatus& status, int response_code, const ResponseCookies& cookies, const std::string& data) { diff --git a/chrome/browser/spellcheck_host.h b/chrome/browser/spellcheck_host.h index aad254a..1f09b35 100644 --- a/chrome/browser/spellcheck_host.h +++ b/chrome/browser/spellcheck_host.h @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -89,7 +89,7 @@ class SpellCheckHost : public base::RefCountedThreadSafe<SpellCheckHost, // spellcheck dictionary; saves the dictionary to |data_|. virtual void OnURLFetchComplete(const URLFetcher* source, const GURL& url, - const URLRequestStatus& status, + const net::URLRequestStatus& status, int response_code, const ResponseCookies& cookies, const std::string& data); diff --git a/chrome/browser/sync/glue/http_bridge.h b/chrome/browser/sync/glue/http_bridge.h index 30a4e22..5fb2419 100644 --- a/chrome/browser/sync/glue/http_bridge.h +++ b/chrome/browser/sync/glue/http_bridge.h @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -41,13 +41,13 @@ class HttpBridge : public base::RefCountedThreadSafe<HttpBridge>, // 2) avoids ifdefs for now // 3) not sure we want to strictly follow settings for cookie policy, // accept lang/charset, since changing these could break syncing. - class RequestContext : public URLRequestContext { + class RequestContext : public net::URLRequestContext { public: // |baseline_context| is used to obtain the accept-language, // accept-charsets, and proxy service information for bridged requests. // Typically |baseline_context| should be the URLRequestContext of the // currently active profile. - explicit RequestContext(URLRequestContext* baseline_context); + explicit RequestContext(net::URLRequestContext* baseline_context); // Set the user agent for requests using this context. The default is // the browser's UA string. @@ -57,7 +57,7 @@ class HttpBridge : public base::RefCountedThreadSafe<HttpBridge>, // If the user agent is set explicitly return that, otherwise call the // base class method to return default value. return user_agent_.empty() ? - URLRequestContext::GetUserAgent(url) : user_agent_; + net::URLRequestContext::GetUserAgent(url) : user_agent_; } private: @@ -65,7 +65,7 @@ class HttpBridge : public base::RefCountedThreadSafe<HttpBridge>, ~RequestContext(); std::string user_agent_; - URLRequestContext* baseline_context_; + net::URLRequestContext* baseline_context_; DISALLOW_COPY_AND_ASSIGN(RequestContext); }; @@ -80,7 +80,7 @@ class HttpBridge : public base::RefCountedThreadSafe<HttpBridge>, bool is_user_agent_set() const { return !user_agent_.empty(); } // URLRequestContextGetter implementation. - virtual URLRequestContext* GetURLRequestContext(); + virtual net::URLRequestContext* GetURLRequestContext(); virtual scoped_refptr<base::MessageLoopProxy> GetIOMessageLoopProxy() const; private: @@ -117,8 +117,9 @@ class HttpBridge : public base::RefCountedThreadSafe<HttpBridge>, const std::string& name) const; // URLFetcher::Delegate implementation. - virtual void OnURLFetchComplete(const URLFetcher* source, const GURL& url, - const URLRequestStatus& status, + virtual void OnURLFetchComplete(const URLFetcher* source, + const GURL& url, + const net::URLRequestStatus& status, int response_code, const ResponseCookies& cookies, const std::string& data); diff --git a/chrome/browser/task_manager/task_manager.h b/chrome/browser/task_manager/task_manager.h index c0f757e..7117092 100644 --- a/chrome/browser/task_manager/task_manager.h +++ b/chrome/browser/task_manager/task_manager.h @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -300,7 +300,7 @@ class TaskManagerModel : public net::URLRequestJobTracker::JobObserver, virtual void OnJobAdded(net::URLRequestJob* job); virtual void OnJobRemoved(net::URLRequestJob* job); virtual void OnJobDone(net::URLRequestJob* job, - const URLRequestStatus& status); + const net::URLRequestStatus& status); virtual void OnJobRedirect(net::URLRequestJob* job, const GURL& location, int status_code); diff --git a/chrome/browser/translate/translate_manager.h b/chrome/browser/translate/translate_manager.h index 48e1951..39d9df7 100644 --- a/chrome/browser/translate/translate_manager.h +++ b/chrome/browser/translate/translate_manager.h @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -66,7 +66,7 @@ class TranslateManager : public NotificationObserver, // URLFetcher::Delegate implementation: virtual void OnURLFetchComplete(const URLFetcher* source, const GURL& url, - const URLRequestStatus& status, + const net::URLRequestStatus& status, int response_code, const ResponseCookies& cookies, const std::string& data); diff --git a/chrome/common/common_param_traits.h b/chrome/common/common_param_traits.h index 3638443..ad9c05a 100644 --- a/chrome/common/common_param_traits.h +++ b/chrome/common/common_param_traits.h @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -40,7 +40,6 @@ class SkBitmap; class DictionaryValue; class ListValue; struct ThumbnailScore; -class URLRequestStatus; struct WebApplicationInfo; class WebCursor; @@ -52,6 +51,7 @@ class Size; namespace net { class UploadData; +class URLRequestStatus; } namespace printing { diff --git a/chrome/common/extensions/extension_localization_peer.h b/chrome/common/extensions/extension_localization_peer.h index 1274421..49881f2 100644 --- a/chrome/common/extensions/extension_localization_peer.h +++ b/chrome/common/extensions/extension_localization_peer.h @@ -1,8 +1,7 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. - #ifndef CHROME_COMMON_EXTENSIONS_EXTENSION_LOCALIZATION_PEER_H_ #define CHROME_COMMON_EXTENSIONS_EXTENSION_LOCALIZATION_PEER_H_ #pragma once @@ -42,7 +41,7 @@ class ExtensionLocalizationPeer bool content_filtered); virtual void OnDownloadedData(int len) {} virtual void OnReceivedData(const char* data, int len); - virtual void OnCompletedRequest(const URLRequestStatus& status, + virtual void OnCompletedRequest(const net::URLRequestStatus& status, const std::string& security_info, const base::Time& completion_time); diff --git a/chrome/common/net/gaia/gaia_auth_fetcher.h b/chrome/common/net/gaia/gaia_auth_fetcher.h index 1a1602d..4fde132 100644 --- a/chrome/common/net/gaia/gaia_auth_fetcher.h +++ b/chrome/common/net/gaia/gaia_auth_fetcher.h @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -76,7 +76,7 @@ class GaiaAuthFetcher : public URLFetcher::Delegate { // Implementation of URLFetcher::Delegate virtual void OnURLFetchComplete(const URLFetcher* source, const GURL& url, - const URLRequestStatus& status, + const net::URLRequestStatus& status, int response_code, const ResponseCookies& cookies, const std::string& data); @@ -116,15 +116,15 @@ class GaiaAuthFetcher : public URLFetcher::Delegate { // Process the results of a ClientLogin fetch. void OnClientLoginFetched(const std::string& data, - const URLRequestStatus& status, + const net::URLRequestStatus& status, int response_code); void OnIssueAuthTokenFetched(const std::string& data, - const URLRequestStatus& status, + const net::URLRequestStatus& status, int response_code); void OnGetUserInfoFetched(const std::string& data, - const URLRequestStatus& status, + const net::URLRequestStatus& status, int response_code); // Tokenize the results of a ClientLogin fetch. @@ -144,7 +144,7 @@ class GaiaAuthFetcher : public URLFetcher::Delegate { // the same error returns. static GoogleServiceAuthError GenerateAuthError( const std::string& data, - const URLRequestStatus& status); + const net::URLRequestStatus& status); // Is this a special case Gaia error for TwoFactor auth? static bool IsSecondFactorSuccess(const std::string& alleged_error); diff --git a/chrome/common/net/url_fetcher.h b/chrome/common/net/url_fetcher.h index 924a6bc..733fd92 100644 --- a/chrome/common/net/url_fetcher.h +++ b/chrome/common/net/url_fetcher.h @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // @@ -26,11 +26,11 @@ class GURL; typedef std::vector<std::string> ResponseCookies; class URLFetcher; class URLRequestContextGetter; -class URLRequestStatus; namespace net { class HttpResponseHeaders; -} +class URLRequestStatus; +} // namespace net // To use this class, create an instance with the desired URL and a pointer to // the object to be notified when the URL has been loaded: @@ -75,7 +75,7 @@ class URLFetcher { // URLFetcher instance is destroyed. virtual void OnURLFetchComplete(const URLFetcher* source, const GURL& url, - const URLRequestStatus& status, + const net::URLRequestStatus& status, int response_code, const ResponseCookies& cookies, const std::string& data) = 0; diff --git a/chrome/common/net/url_request_context_getter.h b/chrome/common/net/url_request_context_getter.h index ade5e1a..0c060e5 100644 --- a/chrome/common/net/url_request_context_getter.h +++ b/chrome/common/net/url_request_context_getter.h @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -15,9 +15,9 @@ class MessageLoopProxy; namespace net { class CookieStore; +class URLRequestContext; } -class URLRequestContext; struct URLRequestContextGetterTraits; // Interface for retrieving an URLRequestContext. @@ -25,7 +25,7 @@ class URLRequestContextGetter : public base::RefCountedThreadSafe<URLRequestContextGetter, URLRequestContextGetterTraits> { public: - virtual URLRequestContext* GetURLRequestContext() = 0; + virtual net::URLRequestContext* GetURLRequestContext() = 0; // Defaults to GetURLRequestContext()->cookie_store(), but // implementations can override it. diff --git a/chrome/common/resource_dispatcher.h b/chrome/common/resource_dispatcher.h index 52c6589..823af81 100644 --- a/chrome/common/resource_dispatcher.h +++ b/chrome/common/resource_dispatcher.h @@ -1,11 +1,11 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // See http://dev.chromium.org/developers/design-documents/multi-process-resource-loading -#ifndef CHROME_COMMON_RESOURCE_DISPATCHER_H__ -#define CHROME_COMMON_RESOURCE_DISPATCHER_H__ +#ifndef CHROME_COMMON_RESOURCE_DISPATCHER_H_ +#define CHROME_COMMON_RESOURCE_DISPATCHER_H_ #pragma once #include <deque> @@ -114,7 +114,7 @@ class ResourceDispatcher : public IPC::Channel::Listener { int data_len); void OnRequestComplete( int request_id, - const URLRequestStatus& status, + const net::URLRequestStatus& status, const std::string& security_info, const base::Time& completion_time); @@ -149,4 +149,4 @@ class ResourceDispatcher : public IPC::Channel::Listener { DISALLOW_COPY_AND_ASSIGN(ResourceDispatcher); }; -#endif // CHROME_COMMON_RESOURCE_DISPATCHER_H__ +#endif // CHROME_COMMON_RESOURCE_DISPATCHER_H_ diff --git a/chrome/common/security_filter_peer.h b/chrome/common/security_filter_peer.h index e82f748..53d0559 100644 --- a/chrome/common/security_filter_peer.h +++ b/chrome/common/security_filter_peer.h @@ -1,10 +1,9 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. - -#ifndef CHROME_COMMON_SECURITY_FILTER_PEER_H__ -#define CHROME_COMMON_SECURITY_FILTER_PEER_H__ +#ifndef CHROME_COMMON_SECURITY_FILTER_PEER_H_ +#define CHROME_COMMON_SECURITY_FILTER_PEER_H_ #pragma once #include "webkit/glue/resource_loader_bridge.h" @@ -41,7 +40,7 @@ class SecurityFilterPeer : public webkit_glue::ResourceLoaderBridge::Peer { bool content_filtered); virtual void OnDownloadedData(int len) {} virtual void OnReceivedData(const char* data, int len); - virtual void OnCompletedRequest(const URLRequestStatus& status, + virtual void OnCompletedRequest(const net::URLRequestStatus& status, const std::string& security_info, const base::Time& completion_time); @@ -70,7 +69,7 @@ class BufferedPeer : public SecurityFilterPeer { const webkit_glue::ResourceResponseInfo& info, bool content_filtered); virtual void OnReceivedData(const char* data, int len); - virtual void OnCompletedRequest(const URLRequestStatus& status, + virtual void OnCompletedRequest(const net::URLRequestStatus& status, const std::string& security_info, const base::Time& completion_time); @@ -111,7 +110,7 @@ class ReplaceContentPeer : public SecurityFilterPeer { const webkit_glue::ResourceResponseInfo& info, bool content_filtered); virtual void OnReceivedData(const char* data, int len); - virtual void OnCompletedRequest(const URLRequestStatus& status, + virtual void OnCompletedRequest(const net::URLRequestStatus& status, const std::string& security_info, const base::Time& completion_time); @@ -123,4 +122,4 @@ class ReplaceContentPeer : public SecurityFilterPeer { DISALLOW_COPY_AND_ASSIGN(ReplaceContentPeer); }; -#endif // CHROME_COMMON_SECURITY_FILTER_PEER_H__ +#endif // CHROME_COMMON_SECURITY_FILTER_PEER_H_ diff --git a/chrome/service/cloud_print/cloud_print_url_fetcher.h b/chrome/service/cloud_print/cloud_print_url_fetcher.h index 5fc4fb1..850265e 100644 --- a/chrome/service/cloud_print/cloud_print_url_fetcher.h +++ b/chrome/service/cloud_print/cloud_print_url_fetcher.h @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -13,7 +13,10 @@ class DictionaryValue; class GURL; + +namespace net { class URLRequestStatus; +} // namespace net // A wrapper around URLFetcher for CloudPrint. URLFetcher applies retry logic // only on HTTP response codes >= 500. In the cloud print case, we want to @@ -36,12 +39,13 @@ class CloudPrintURLFetcher // error checking is done before this method is called. If the delegate // returns CONTINUE_PROCESSING, we will then check for network // errors. Most implementations will not override this. - virtual ResponseAction HandleRawResponse(const URLFetcher* source, - const GURL& url, - const URLRequestStatus& status, - int response_code, - const ResponseCookies& cookies, - const std::string& data) { + virtual ResponseAction HandleRawResponse( + const URLFetcher* source, + const GURL& url, + const net::URLRequestStatus& status, + int response_code, + const ResponseCookies& cookies, + const std::string& data) { return CONTINUE_PROCESSING; } // This will be invoked only if HandleRawResponse returns @@ -87,7 +91,7 @@ class CloudPrintURLFetcher // URLFetcher::Delegate implementation. virtual void OnURLFetchComplete(const URLFetcher* source, const GURL& url, - const URLRequestStatus& status, + const net::URLRequestStatus& status, int response_code, const ResponseCookies& cookies, const std::string& data); diff --git a/chrome/service/gaia/service_gaia_authenticator.cc b/chrome/service/gaia/service_gaia_authenticator.cc index d6a1948..1f57626 100644 --- a/chrome/service/gaia/service_gaia_authenticator.cc +++ b/chrome/service/gaia/service_gaia_authenticator.cc @@ -72,9 +72,12 @@ void ServiceGaiaAuthenticator::DoPost(const GURL& post_url, // URLFetcher::Delegate implementation void ServiceGaiaAuthenticator::OnURLFetchComplete( - const URLFetcher *source, const GURL &url, const URLRequestStatus &status, - int response_code, const ResponseCookies &cookies, - const std::string &data) { + const URLFetcher* source, + const GURL& url, + const net::URLRequestStatus& status, + int response_code, + const ResponseCookies& cookies, + const std::string& data) { DCHECK(io_message_loop_proxy_->BelongsToCurrentThread()); http_response_code_ = response_code; response_data_ = data; diff --git a/chrome/service/gaia/service_gaia_authenticator.h b/chrome/service/gaia/service_gaia_authenticator.h index 5d2813a..14adcff 100644 --- a/chrome/service/gaia/service_gaia_authenticator.h +++ b/chrome/service/gaia/service_gaia_authenticator.h @@ -33,7 +33,7 @@ class ServiceGaiaAuthenticator // URLFetcher::Delegate implementation. virtual void OnURLFetchComplete(const URLFetcher *source, const GURL &url, - const URLRequestStatus &status, + const net::URLRequestStatus &status, int response_code, const ResponseCookies &cookies, const std::string &data); diff --git a/chrome/service/net/service_url_request_context.h b/chrome/service/net/service_url_request_context.h index d1bb2bf..4e6e296 100644 --- a/chrome/service/net/service_url_request_context.h +++ b/chrome/service/net/service_url_request_context.h @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -29,7 +29,7 @@ class MessageLoopProxy; // for requests. This subclass is meant to be used in the service process where // the profile is not available. // -class ServiceURLRequestContext : public URLRequestContext { +class ServiceURLRequestContext : public net::URLRequestContext { public: explicit ServiceURLRequestContext(const std::string& user_agent); void set_cookie_policy(net::CookiePolicy* policy) { @@ -50,7 +50,7 @@ class ServiceURLRequestContextGetter : public URLRequestContextGetter { public: ServiceURLRequestContextGetter(); - virtual URLRequestContext* GetURLRequestContext(); + virtual net::URLRequestContext* GetURLRequestContext(); virtual scoped_refptr<base::MessageLoopProxy> GetIOMessageLoopProxy() const; void set_user_agent(const std::string& ua) { @@ -63,7 +63,7 @@ class ServiceURLRequestContextGetter : public URLRequestContextGetter { virtual ~ServiceURLRequestContextGetter(); std::string user_agent_; - scoped_refptr<URLRequestContext> url_request_context_; + scoped_refptr<net::URLRequestContext> url_request_context_; scoped_refptr<base::MessageLoopProxy> io_message_loop_proxy_; }; diff --git a/chrome/test/automation/automation_proxy_uitest.h b/chrome/test/automation/automation_proxy_uitest.h index 0b5556f..c08aa91 100644 --- a/chrome/test/automation/automation_proxy_uitest.h +++ b/chrome/test/automation/automation_proxy_uitest.h @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -45,7 +45,7 @@ class ExternalTabUITestMockClient : public AutomationProxy { MOCK_METHOD2(OnRequestRead, void(int request_id, int bytes_to_read)); MOCK_METHOD2(OnRequestEnd, void(int request_id, - const URLRequestStatus& status)); + const net::URLRequestStatus& status)); MOCK_METHOD2(OnSetCookieAsync, void(const GURL& url, const std::string& cookie)); MOCK_METHOD1(HandleClosed, void(int handle)); @@ -67,7 +67,9 @@ class ExternalTabUITestMockClient : public AutomationProxy { int tab_handle, int request_id); void ReplyData(const std::string* data, int tab_handle, int request_id); void ReplyEOF(int tab_handle, int request_id); - void ReplyEnd(const URLRequestStatus& status, int tab_handle, int request_id); + void ReplyEnd(const net::URLRequestStatus& status, + int tab_handle, + int request_id); void Reply404(int tab_handle, int request_id); // Test setup helpers diff --git a/chrome/test/test_url_request_context_getter.h b/chrome/test/test_url_request_context_getter.h index 8ac7b05..61dc327 100644 --- a/chrome/test/test_url_request_context_getter.h +++ b/chrome/test/test_url_request_context_getter.h @@ -1,9 +1,10 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef CHROME_TEST_TEST_URL_REQUEST_CONTEXT_GETTER_H_ #define CHROME_TEST_TEST_URL_REQUEST_CONTEXT_GETTER_H_ +#pragma once #include "base/ref_counted.h" #include "chrome/browser/browser_thread.h" @@ -17,7 +18,7 @@ // special trait that deletes it on the IO thread. class TestURLRequestContextGetter : public URLRequestContextGetter { public: - virtual URLRequestContext* GetURLRequestContext() { + virtual net::URLRequestContext* GetURLRequestContext() { if (!context_) context_ = new TestURLRequestContext(); return context_.get(); @@ -27,7 +28,7 @@ class TestURLRequestContextGetter : public URLRequestContextGetter { } private: - scoped_refptr<URLRequestContext> context_; + scoped_refptr<net::URLRequestContext> context_; }; #endif // CHROME_TEST_TEST_URL_REQUEST_CONTEXT_GETTER_H_ diff --git a/chrome_frame/cfproxy.h b/chrome_frame/cfproxy.h index b32bf78..af86341 100644 --- a/chrome_frame/cfproxy.h +++ b/chrome_frame/cfproxy.h @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -32,7 +32,6 @@ enum AutomationPageFontSize { class ChromeProxyDelegate; class ChromeProxyFactory; class GURL; -class URLRequestStatus; struct AttachExternalTabParams; struct AutomationURLRequest; struct ExternalTabSettings; @@ -40,6 +39,10 @@ struct MiniContextMenuParams; struct NavigationInfo; struct ProxyParams; +namespace net { +class URLRequestStatus; +} // namespace net + // Some callers of synchronous messages wants a context to be passed back // in order to identify the call they made. Presumably one can make // multiple sync calls of same type (as async) and want to identify what diff --git a/chrome_frame/chrome_frame_automation.h b/chrome_frame/chrome_frame_automation.h index a8395d2..f4314ab 100644 --- a/chrome_frame/chrome_frame_automation.h +++ b/chrome_frame/chrome_frame_automation.h @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -500,7 +500,8 @@ class ChromeFrameAutomationClient const char* headers, int size, base::Time last_modified, const std::string& redirect_url, int redirect_status); virtual void OnReadComplete(int request_id, const std::string& data); - virtual void OnResponseEnd(int request_id, const URLRequestStatus& status); + virtual void OnResponseEnd(int request_id, + const net::URLRequestStatus& status); virtual void OnCookiesRetrieved(bool success, const GURL& url, const std::string& cookie_string, int cookie_id); diff --git a/chrome_frame/chrome_frame_delegate.h b/chrome_frame/chrome_frame_delegate.h index 1a0f34b..1954747 100644 --- a/chrome_frame/chrome_frame_delegate.h +++ b/chrome_frame/chrome_frame_delegate.h @@ -1,9 +1,10 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef CHROME_FRAME_CHROME_FRAME_DELEGATE_H_ #define CHROME_FRAME_CHROME_FRAME_DELEGATE_H_ +#pragma once #include <atlbase.h> #include <atlwin.h> @@ -107,7 +108,8 @@ class ChromeFrameDelegateImpl : public ChromeFrameDelegate { virtual void OnRequestStart( int request_id, const AutomationURLRequest& request) {} virtual void OnRequestRead(int request_id, int bytes_to_read) {} - virtual void OnRequestEnd(int request_id, const URLRequestStatus& status) {} + virtual void OnRequestEnd(int request_id, + const net::URLRequestStatus& status) {} virtual void OnDownloadRequestInHost(int request_id) {} virtual void OnSetCookieAsync(const GURL& url, const std::string& cookie) {} virtual void OnAttachExternalTab( diff --git a/chrome_frame/external_tab.h b/chrome_frame/external_tab.h index 4fbb5d3..ac7aff3 100644 --- a/chrome_frame/external_tab.h +++ b/chrome_frame/external_tab.h @@ -22,14 +22,15 @@ class Task; class CancelableTask; + namespace base { - class TimeDelta; - class WaitableEvent; +class TimeDelta; +class WaitableEvent; } namespace IPC { - struct NavigationInfo; - struct MiniContextMenuParams; +struct NavigationInfo; +struct MiniContextMenuParams; } // This is the delegate/callback interface that has to be implemented @@ -150,7 +151,7 @@ class ExternalTabProxy : public CWindowImpl<ExternalTabProxy>, virtual void OnNetwork_Start( int request_id, const AutomationURLRequest& request_info); virtual void OnNetwork_Read(int request_id, int bytes_to_read); - virtual void OnNetwork_End(int request_id, const URLRequestStatus& s); + virtual void OnNetwork_End(int request_id, const net::URLRequestStatus& s); virtual void OnNetwork_DownloadInHost(int request_id); virtual void OnGetCookies(const GURL& url, int cookie_id); virtual void OnSetCookie(const GURL& url, const std::string& cookie); diff --git a/chrome_frame/npapi_url_request.h b/chrome_frame/npapi_url_request.h index cce1b88..eace09d 100644 --- a/chrome_frame/npapi_url_request.h +++ b/chrome_frame/npapi_url_request.h @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -56,7 +56,8 @@ class NPAPIUrlRequestManager : public PluginUrlRequestManager, const char* headers, int size, base::Time last_modified, const std::string& redirect_url, int redirect_status); virtual void OnReadComplete(int request_id, const std::string& data); - virtual void OnResponseEnd(int request_id, const URLRequestStatus& status); + virtual void OnResponseEnd(int request_id, + const net::URLRequestStatus& status); virtual void OnCookiesRetrieved(bool success, const GURL& url, const std::string& cookie_string, int cookie_id); diff --git a/chrome_frame/plugin_url_request.h b/chrome_frame/plugin_url_request.h index a39cf7d..cc9a17a 100644 --- a/chrome_frame/plugin_url_request.h +++ b/chrome_frame/plugin_url_request.h @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -29,7 +29,7 @@ class DECLSPEC_NOVTABLE PluginUrlRequestDelegate { // NOLINT const std::string& redirect_url, int redirect_status) = 0; virtual void OnReadComplete(int request_id, const std::string& data) = 0; virtual void OnResponseEnd(int request_id, - const URLRequestStatus& status) = 0; + const net::URLRequestStatus& status) = 0; virtual void AddPrivacyDataForUrl(const std::string& url, const std::string& policy_ref, int32 flags) {} @@ -77,7 +77,7 @@ class DECLSPEC_NOVTABLE PluginUrlRequestManager { // NOLINT ReadRequest(request_id, bytes_to_read); } - void EndUrlRequest(int request_id, const URLRequestStatus& s) { + void EndUrlRequest(int request_id, const net::URLRequestStatus& s) { EndRequest(request_id); } diff --git a/chrome_frame/test/automation_client_mock.h b/chrome_frame/test/automation_client_mock.h index 4a25b10c..39d2f32 100644 --- a/chrome_frame/test/automation_client_mock.h +++ b/chrome_frame/test/automation_client_mock.h @@ -1,6 +1,7 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. + #ifndef CHROME_FRAME_TEST_AUTOMATION_CLIENT_MOCK_H_ #define CHROME_FRAME_TEST_AUTOMATION_CLIENT_MOCK_H_ @@ -53,7 +54,7 @@ struct MockCFDelegate : public ChromeFrameDelegateImpl { const AutomationURLRequest& request)); MOCK_METHOD2(OnRequestRead, void(int request_id, int bytes_to_read)); MOCK_METHOD2(OnRequestEnd, void(int request_id, - const URLRequestStatus& status)); + const net::URLRequestStatus& status)); MOCK_METHOD2(OnSetCookieAsync, void(const GURL& url, const std::string& cookie)); @@ -71,13 +72,13 @@ struct MockCFDelegate : public ChromeFrameDelegateImpl { request_delegate_->OnReadComplete(request_id, *data); } - void Reply(const URLRequestStatus& status, int request_id) { + void Reply(const net::URLRequestStatus& status, int request_id) { request_delegate_->OnResponseEnd(request_id, status); } void Reply404(int request_id) { ReplyStarted(request_id, "HTTP/1.1 404\r\n\r\n"); - Reply(URLRequestStatus(), request_id); + Reply(net::URLRequestStatus(), request_id); } PluginUrlRequestDelegate* request_delegate_; @@ -180,6 +181,4 @@ class CFACMockTest : public testing::Test { } }; - #endif // CHROME_FRAME_TEST_AUTOMATION_CLIENT_MOCK_H_ - diff --git a/chrome_frame/urlmon_url_request.h b/chrome_frame/urlmon_url_request.h index a0c9605..4c60dcb 100644 --- a/chrome_frame/urlmon_url_request.h +++ b/chrome_frame/urlmon_url_request.h @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -97,7 +97,8 @@ class UrlmonUrlRequestManager const std::string& redirect_url, int redirect_status); virtual void OnReadComplete(int request_id, const std::string& data); - virtual void OnResponseEnd(int request_id, const URLRequestStatus& status); + virtual void OnResponseEnd(int request_id, + const net::URLRequestStatus& status); virtual void OnCookiesRetrieved(bool success, const GURL& url, const std::string& cookie_string, int cookie_id); diff --git a/chrome_frame/urlmon_url_request_private.h b/chrome_frame/urlmon_url_request_private.h index ebe027c..90068bd 100644 --- a/chrome_frame/urlmon_url_request_private.h +++ b/chrome_frame/urlmon_url_request_private.h @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -164,7 +164,7 @@ class UrlmonUrlRequest // Assumes binding_->Abort() will be called! void SetRedirected(int http_code, const std::string& utf8_url) { DCHECK_EQ(state_, WORKING); - DCHECK_EQ(result_.status(), URLRequestStatus::SUCCESS); + DCHECK_EQ(result_.status(), net::URLRequestStatus::SUCCESS); redirect_.utf8_url = utf8_url; // At times we receive invalid redirect codes like 0, 200, etc. We @@ -176,7 +176,7 @@ class UrlmonUrlRequest state_ = ABORTING; } - // Set the result as URLRequestStatus::CANCELED. + // Set the result as net::URLRequestStatus::CANCELED. // Switch to [ABORTING] state (if not already in that state). void Cancel() { if (state_ == DONE) @@ -190,7 +190,7 @@ class UrlmonUrlRequest redirect_.utf8_url.clear(); } - set_result(URLRequestStatus::CANCELED, 0); + set_result(net::URLRequestStatus::CANCELED, 0); } void Done() { @@ -205,25 +205,25 @@ class UrlmonUrlRequest return redirect_; } - const URLRequestStatus& get_result() const { + const net::URLRequestStatus& get_result() const { return result_; } - void set_result(URLRequestStatus::Status status, int os_error) { + void set_result(net::URLRequestStatus::Status status, int os_error) { result_.set_status(status); result_.set_os_error(os_error); } void set_result(HRESULT hr) { - result_.set_status(FAILED(hr)? URLRequestStatus::FAILED: - URLRequestStatus::SUCCESS); + result_.set_status(FAILED(hr)? net::URLRequestStatus::FAILED: + net::URLRequestStatus::SUCCESS); result_.set_os_error(HresultToNetError(hr)); } private: Redirection redirect_; State state_; - URLRequestStatus result_; + net::URLRequestStatus result_; }; Status status_; diff --git a/net/ocsp/nss_ocsp.h b/net/ocsp/nss_ocsp.h index cf2e66e..fae7a87 100644 --- a/net/ocsp/nss_ocsp.h +++ b/net/ocsp/nss_ocsp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -6,10 +6,10 @@ #define NET_OCSP_NSS_OCSP_H_ #pragma once -class URLRequestContext; - namespace net { +class URLRequestContext; + // Sets the MessageLoop for OCSP to the current message loop. // This should be called before EnsureOCSPInit() if you want to // control the message loop for OCSP. diff --git a/net/proxy/proxy_script_fetcher.h b/net/proxy/proxy_script_fetcher.h index bf33bcb..9829316 100644 --- a/net/proxy/proxy_script_fetcher.h +++ b/net/proxy/proxy_script_fetcher.h @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -14,10 +14,11 @@ #include "net/base/completion_callback.h" class GURL; -class URLRequestContext; namespace net { +class URLRequestContext; + // Interface for downloading a PAC script. Implementations can enforce // timeouts, maximum size constraints, content encoding, etc.. class ProxyScriptFetcher { diff --git a/net/proxy/proxy_script_fetcher_impl.h b/net/proxy/proxy_script_fetcher_impl.h index 446165045..bd141f3 100644 --- a/net/proxy/proxy_script_fetcher_impl.h +++ b/net/proxy/proxy_script_fetcher_impl.h @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -16,11 +16,12 @@ #include "net/url_request/url_request.h" class GURL; -class URLRequestContext; class X509Certificate; namespace net { +class URLRequestContext; + // Implementation of ProxyScriptFetcher that downloads scripts using the // specified request context. class ProxyScriptFetcherImpl : public ProxyScriptFetcher, diff --git a/net/proxy/proxy_service.h b/net/proxy/proxy_service.h index 131c98c..f9424d7 100644 --- a/net/proxy/proxy_service.h +++ b/net/proxy/proxy_service.h @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -21,7 +21,6 @@ class GURL; class MessageLoop; -class URLRequestContext; namespace net { @@ -29,6 +28,7 @@ class HostResolver; class InitProxyResolver; class ProxyResolver; class ProxyScriptFetcher; +class URLRequestContext; // This class can be used to resolve the proxy server to use when loading a // HTTP(S) URL. It uses the given ProxyResolver to handle the actual proxy diff --git a/net/socket_stream/socket_stream_job.h b/net/socket_stream/socket_stream_job.h index a301709..973c20a 100644 --- a/net/socket_stream/socket_stream_job.h +++ b/net/socket_stream/socket_stream_job.h @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. diff --git a/net/url_request/https_prober.h b/net/url_request/https_prober.h index 5d1a6222..6540224 100644 --- a/net/url_request/https_prober.h +++ b/net/url_request/https_prober.h @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -14,10 +14,11 @@ #include "net/url_request/url_request.h" template <typename T> struct DefaultSingletonTraits; -class URLRequestContext; namespace net { +class URLRequestContext; + // This should be scoped inside HTTPSProber, but VC cannot compile // HTTPProber::Delegate when HTTPSProber also inherits from // net::URLRequest::Delegate. @@ -77,4 +78,5 @@ class HTTPSProber : public net::URLRequest::Delegate { }; } // namespace net -#endif + +#endif // NET_BASE_HTTPS_PROBER_H_ diff --git a/net/url_request/url_request.h b/net/url_request/url_request.h index 9d4347d..3561a29 100644 --- a/net/url_request/url_request.h +++ b/net/url_request/url_request.h @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -28,17 +28,7 @@ namespace base { class Time; } // namespace base -namespace net { -class CookieOptions; -class IOBuffer; -class SSLCertRequestInfo; -class UploadData; -class URLRequestJob; -class X509Certificate; -} // namespace net - class FilePath; -class URLRequestContext; // This stores the values of the Set-Cookie headers received during the request. // Each item in the vector corresponds to a Set-Cookie: line received, @@ -46,6 +36,15 @@ class URLRequestContext; typedef std::vector<std::string> ResponseCookies; namespace net { + +class CookieOptions; +class IOBuffer; +class SSLCertRequestInfo; +class UploadData; +class URLRequestContext; +class URLRequestJob; +class X509Certificate; + //----------------------------------------------------------------------------- // A class representing the asynchronous load of a data stream from an URL. // @@ -435,7 +434,7 @@ class URLRequest : public base::NonThreadSafe { bool is_pending() const { return is_pending_; } // Returns the error status of the request. - const URLRequestStatus& status() const { return status_; } + const net::URLRequestStatus& status() const { return status_; } // This method is called to start the request. The delegate will receive // a OnResponseStarted callback when the request is started. @@ -550,7 +549,7 @@ class URLRequest : public base::NonThreadSafe { void set_is_pending(bool value) { is_pending_ = value; } // Allow the URLRequestJob class to set our status too - void set_status(const URLRequestStatus& value) { status_ = value; } + void set_status(const net::URLRequestStatus& value) { status_ = value; } // Allow the URLRequestJob to redirect this request. Returns net::OK if // successful, otherwise an error code is returned. @@ -610,7 +609,7 @@ class URLRequest : public base::NonThreadSafe { // Current error status of the job. When no error has been encountered, this // will be SUCCESS. If multiple errors have been encountered, this will be // the first non-SUCCESS status seen. - URLRequestStatus status_; + net::URLRequestStatus status_; // The HTTP response info, lazily initialized. net::HttpResponseInfo response_info_; diff --git a/net/url_request/url_request_context.cc b/net/url_request/url_request_context.cc index 3bc7da6..8e0f3bd 100644 --- a/net/url_request/url_request_context.cc +++ b/net/url_request/url_request_context.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -8,6 +8,8 @@ #include "net/base/cookie_store.h" #include "net/base/host_resolver.h" +namespace net { + URLRequestContext::URLRequestContext() : net_log_(NULL), host_resolver_(NULL), @@ -30,6 +32,8 @@ const std::string& URLRequestContext::GetUserAgent(const GURL& url) const { URLRequestContext::~URLRequestContext() { } -void URLRequestContext::set_cookie_store(net::CookieStore* cookie_store) { +void URLRequestContext::set_cookie_store(CookieStore* cookie_store) { cookie_store_ = cookie_store; } + +} // namespace net diff --git a/net/url_request/url_request_context.h b/net/url_request/url_request_context.h index 517148e..b54faf4 100644 --- a/net/url_request/url_request_context.h +++ b/net/url_request/url_request_context.h @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -33,9 +33,8 @@ class HttpNetworkDelegate; class HttpTransactionFactory; class SSLConfigService; class URLRequest; -} // namespace net -// Subclass to provide application-specific context for net::URLRequest +// Subclass to provide application-specific context for URLRequest // instances. class URLRequestContext : public base::RefCountedThreadSafe<URLRequestContext>, @@ -43,94 +42,94 @@ class URLRequestContext public: URLRequestContext(); - net::NetLog* net_log() const { + NetLog* net_log() const { return net_log_; } - void set_net_log(net::NetLog* net_log) { + void set_net_log(NetLog* net_log) { net_log_ = net_log; } - net::HostResolver* host_resolver() const { + HostResolver* host_resolver() const { return host_resolver_; } - void set_host_resolver(net::HostResolver* host_resolver) { + void set_host_resolver(HostResolver* host_resolver) { host_resolver_ = host_resolver; } - net::CertVerifier* cert_verifier() const { + CertVerifier* cert_verifier() const { return cert_verifier_; } - void set_cert_verifier(net::CertVerifier* cert_verifier) { + void set_cert_verifier(CertVerifier* cert_verifier) { cert_verifier_ = cert_verifier; } - net::DnsRRResolver* dnsrr_resolver() const { + DnsRRResolver* dnsrr_resolver() const { return dnsrr_resolver_; } - void set_dnsrr_resolver(net::DnsRRResolver* dnsrr_resolver) { + void set_dnsrr_resolver(DnsRRResolver* dnsrr_resolver) { dnsrr_resolver_ = dnsrr_resolver; } - net::DnsCertProvenanceChecker* dns_cert_checker() const { + DnsCertProvenanceChecker* dns_cert_checker() const { return dns_cert_checker_.get(); } // Get the proxy service for this context. - net::ProxyService* proxy_service() const { + ProxyService* proxy_service() const { return proxy_service_; } - void set_proxy_service(net::ProxyService* proxy_service) { + void set_proxy_service(ProxyService* proxy_service) { proxy_service_ = proxy_service; } // Get the ssl config service for this context. - net::SSLConfigService* ssl_config_service() const { + SSLConfigService* ssl_config_service() const { return ssl_config_service_; } // Gets the HTTP Authentication Handler Factory for this context. // The factory is only valid for the lifetime of this URLRequestContext - net::HttpAuthHandlerFactory* http_auth_handler_factory() { + HttpAuthHandlerFactory* http_auth_handler_factory() { return http_auth_handler_factory_; } - void set_http_auth_handler_factory(net::HttpAuthHandlerFactory* factory) { + void set_http_auth_handler_factory(HttpAuthHandlerFactory* factory) { http_auth_handler_factory_ = factory; } // Gets the http transaction factory for this context. - net::HttpTransactionFactory* http_transaction_factory() const { + HttpTransactionFactory* http_transaction_factory() const { return http_transaction_factory_; } - void set_http_transaction_factory(net::HttpTransactionFactory* factory) { + void set_http_transaction_factory(HttpTransactionFactory* factory) { http_transaction_factory_ = factory; } // Gets the ftp transaction factory for this context. - net::FtpTransactionFactory* ftp_transaction_factory() { + FtpTransactionFactory* ftp_transaction_factory() { return ftp_transaction_factory_; } // Gets the cookie store for this context (may be null, in which case // cookies are not stored). - net::CookieStore* cookie_store() { return cookie_store_.get(); } + CookieStore* cookie_store() { return cookie_store_.get(); } - void set_cookie_store(net::CookieStore* cookie_store); + void set_cookie_store(CookieStore* cookie_store); // Gets the cookie policy for this context (may be null, in which case // cookies are allowed). - net::CookiePolicy* cookie_policy() { return cookie_policy_; } + CookiePolicy* cookie_policy() { return cookie_policy_; } - net::TransportSecurityState* transport_security_state() { + TransportSecurityState* transport_security_state() { return transport_security_state_; } // Gets the FTP authentication cache for this context. - net::FtpAuthCache* ftp_auth_cache() { return &ftp_auth_cache_; } + FtpAuthCache* ftp_auth_cache() { return &ftp_auth_cache_; } // Gets the value of 'Accept-Charset' header field. const std::string& accept_charset() const { return accept_charset_; } @@ -162,21 +161,21 @@ class URLRequestContext // The following members are expected to be initialized and owned by // subclasses. - net::NetLog* net_log_; - net::HostResolver* host_resolver_; - net::CertVerifier* cert_verifier_; - net::DnsRRResolver* dnsrr_resolver_; - scoped_ptr<net::DnsCertProvenanceChecker> dns_cert_checker_; - scoped_refptr<net::ProxyService> proxy_service_; - scoped_refptr<net::SSLConfigService> ssl_config_service_; - net::HttpTransactionFactory* http_transaction_factory_; - net::FtpTransactionFactory* ftp_transaction_factory_; - net::HttpAuthHandlerFactory* http_auth_handler_factory_; - net::HttpNetworkDelegate* network_delegate_; - scoped_refptr<net::CookieStore> cookie_store_; - net::CookiePolicy* cookie_policy_; - scoped_refptr<net::TransportSecurityState> transport_security_state_; - net::FtpAuthCache ftp_auth_cache_; + NetLog* net_log_; + HostResolver* host_resolver_; + CertVerifier* cert_verifier_; + DnsRRResolver* dnsrr_resolver_; + scoped_ptr<DnsCertProvenanceChecker> dns_cert_checker_; + scoped_refptr<ProxyService> proxy_service_; + scoped_refptr<SSLConfigService> ssl_config_service_; + HttpTransactionFactory* http_transaction_factory_; + FtpTransactionFactory* ftp_transaction_factory_; + HttpAuthHandlerFactory* http_auth_handler_factory_; + HttpNetworkDelegate* network_delegate_; + scoped_refptr<CookieStore> cookie_store_; + CookiePolicy* cookie_policy_; + scoped_refptr<TransportSecurityState> transport_security_state_; + FtpAuthCache ftp_auth_cache_; std::string accept_language_; std::string accept_charset_; // The charset of the referrer where this request comes from. It's not @@ -191,4 +190,9 @@ class URLRequestContext DISALLOW_COPY_AND_ASSIGN(URLRequestContext); }; +} // namespace net + +// TODO(tfarina): Fix the callers and remove this! +typedef net::URLRequestContext URLRequestContext; + #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_ diff --git a/net/url_request/url_request_ftp_job.h b/net/url_request/url_request_ftp_job.h index d503766..ed65214 100644 --- a/net/url_request/url_request_ftp_job.h +++ b/net/url_request/url_request_ftp_job.h @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -16,10 +16,10 @@ #include "net/ftp/ftp_transaction.h" #include "net/url_request/url_request_job.h" -class URLRequestContext; - namespace net { +class URLRequestContext; + // A URLRequestJob subclass that is built on top of FtpTransaction. It // provides an implementation for FTP. class URLRequestFtpJob : public URLRequestJob { diff --git a/net/url_request/url_request_http_job.h b/net/url_request/url_request_http_job.h index 78778c5..fbd8baf 100644 --- a/net/url_request/url_request_http_job.h +++ b/net/url_request/url_request_http_job.h @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -18,12 +18,11 @@ #include "net/url_request/url_request_job.h" #include "net/url_request/url_request_throttler_entry_interface.h" -class URLRequestContext; - namespace net { class HttpResponseInfo; class HttpTransaction; +class URLRequestContext; // A net::URLRequestJob subclass that is built on top of HttpTransaction. It // provides an implementation for both HTTP and HTTPS. diff --git a/net/url_request/url_request_job.h b/net/url_request/url_request_job.h index 6f91c9a9..23a3232 100644 --- a/net/url_request/url_request_job.h +++ b/net/url_request/url_request_job.h @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -17,7 +17,6 @@ #include "net/base/filter.h" #include "net/base/load_states.h" -class URLRequestStatus; namespace net { @@ -28,6 +27,7 @@ class IOBuffer; class URLRequest; class URLRequestJobMetrics; class UploadData; +class URLRequestStatus; class X509Certificate; class URLRequestJob : public base::RefCounted<URLRequestJob>, @@ -225,13 +225,13 @@ class URLRequestJob : public base::RefCounted<URLRequestJob>, void NotifyReadComplete(int bytes_read); // Notifies the request that a start error has occurred. - void NotifyStartError(const URLRequestStatus& status); + void NotifyStartError(const net::URLRequestStatus& status); // NotifyDone marks when we are done with a request. It is really // a glorified set_status, but also does internal state checking and // job tracking. It should be called once per request, when the job is // finished doing all IO. - void NotifyDone(const URLRequestStatus& status); + void NotifyDone(const net::URLRequestStatus& status); // Some work performed by NotifyDone must be completed on a separate task // so as to avoid re-entering the delegate. This method exists to perform @@ -282,10 +282,10 @@ class URLRequestJob : public base::RefCounted<URLRequestJob>, net::URLRequest* request_; // The status of the job. - const URLRequestStatus GetStatus(); + const net::URLRequestStatus GetStatus(); // Set the status of the job. - void SetStatus(const URLRequestStatus& status); + void SetStatus(const net::URLRequestStatus& status); // Whether the job is doing performance profiling bool is_profiling_; diff --git a/net/url_request/url_request_job_tracker.h b/net/url_request/url_request_job_tracker.h index 4c8ecec..4a03cf7 100644 --- a/net/url_request/url_request_job_tracker.h +++ b/net/url_request/url_request_job_tracker.h @@ -40,7 +40,7 @@ class URLRequestJobTracker { // Called when the given job has completed, before notifying the request virtual void OnJobDone(URLRequestJob* job, - const URLRequestStatus& status) = 0; + const net::URLRequestStatus& status) = 0; // Called when the given job is about to follow a redirect to the given // new URL. The redirect type is given in status_code @@ -77,7 +77,7 @@ class URLRequestJobTracker { void RemoveJob(URLRequestJob* job); // Job status change notifications - void OnJobDone(URLRequestJob* job, const URLRequestStatus& status); + void OnJobDone(URLRequestJob* job, const net::URLRequestStatus& status); void OnJobRedirect(URLRequestJob* job, const GURL& location, int status_code); diff --git a/net/url_request/url_request_status.h b/net/url_request/url_request_status.h index ca376fb..332e7e9 100644 --- a/net/url_request/url_request_status.h +++ b/net/url_request/url_request_status.h @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // @@ -9,6 +9,8 @@ #define NET_URL_REQUEST_URL_REQUEST_STATUS_H_ #pragma once +namespace net { + // Represents the result of a URL request. It encodes errors and various // types of success. class URLRequestStatus { @@ -64,4 +66,9 @@ class URLRequestStatus { int os_error_; }; +} // namespace net + +// TODO(tfarina): Fix the callers and remove this! +typedef net::URLRequestStatus URLRequestStatus; + #endif // NET_URL_REQUEST_URL_REQUEST_STATUS_H_ diff --git a/net/url_request/url_request_test_job.cc b/net/url_request/url_request_test_job.cc index 7fd019c..4aa7c16 100644 --- a/net/url_request/url_request_test_job.cc +++ b/net/url_request/url_request_test_job.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -16,7 +16,9 @@ // This emulates the global message loop for the test URL request class, since // this is only test code, it's probably not too dangerous to have this static // object. -static std::vector< scoped_refptr<URLRequestTestJob> > pending_jobs; +static std::vector< scoped_refptr<URLRequestTestJob> > g_pending_jobs; + +namespace net { // static getters for known URLs GURL URLRequestTestJob::test_url_1() { @@ -70,13 +72,13 @@ std::string URLRequestTestJob::test_error_headers() { } // static -net::URLRequestJob* URLRequestTestJob::Factory(net::URLRequest* request, - const std::string& scheme) { +URLRequestJob* URLRequestTestJob::Factory(URLRequest* request, + const std::string& scheme) { return new URLRequestTestJob(request); } -URLRequestTestJob::URLRequestTestJob(net::URLRequest* request) - : net::URLRequestJob(request), +URLRequestTestJob::URLRequestTestJob(URLRequest* request) + : URLRequestJob(request), auto_advance_(false), stage_(WAITING), offset_(0), @@ -84,9 +86,9 @@ URLRequestTestJob::URLRequestTestJob(net::URLRequest* request) async_buf_size_(0) { } -URLRequestTestJob::URLRequestTestJob(net::URLRequest* request, +URLRequestTestJob::URLRequestTestJob(URLRequest* request, bool auto_advance) - : net::URLRequestJob(request), + : URLRequestJob(request), auto_advance_(auto_advance), stage_(WAITING), offset_(0), @@ -94,14 +96,14 @@ URLRequestTestJob::URLRequestTestJob(net::URLRequest* request, async_buf_size_(0) { } -URLRequestTestJob::URLRequestTestJob(net::URLRequest* request, +URLRequestTestJob::URLRequestTestJob(URLRequest* request, const std::string& response_headers, const std::string& response_data, bool auto_advance) - : net::URLRequestJob(request), + : URLRequestJob(request), auto_advance_(auto_advance), stage_(WAITING), - response_headers_(new net::HttpResponseHeaders(response_headers)), + response_headers_(new HttpResponseHeaders(response_headers)), response_data_(response_data), offset_(0), async_buf_(NULL), @@ -127,7 +129,7 @@ void URLRequestTestJob::Start() { void URLRequestTestJob::StartAsync() { if (!response_headers_) { - response_headers_ = new net::HttpResponseHeaders(test_headers()); + response_headers_ = new HttpResponseHeaders(test_headers()); if (request_->url().spec() == test_url_1().spec()) { response_data_ = test_data_1(); stage_ = DATA_AVAILABLE; // Simulate a synchronous response for this one. @@ -140,7 +142,7 @@ void URLRequestTestJob::StartAsync() { // FIXME(brettw) we may want to use WININET errors or have some more types // of errors NotifyDone(URLRequestStatus(URLRequestStatus::FAILED, - net::ERR_INVALID_URL)); + ERR_INVALID_URL)); // FIXME(brettw): this should emulate a network error, and not just fail // initiating a connection return; @@ -152,7 +154,7 @@ void URLRequestTestJob::StartAsync() { this->NotifyHeadersComplete(); } -bool URLRequestTestJob::ReadRawData(net::IOBuffer* buf, int buf_size, +bool URLRequestTestJob::ReadRawData(IOBuffer* buf, int buf_size, int *bytes_read) { if (stage_ == WAITING) { async_buf_ = buf; @@ -179,7 +181,7 @@ bool URLRequestTestJob::ReadRawData(net::IOBuffer* buf, int buf_size, return true; } -void URLRequestTestJob::GetResponseInfo(net::HttpResponseInfo* info) { +void URLRequestTestJob::GetResponseInfo(HttpResponseInfo* info) { if (response_headers_) info->headers = response_headers_; } @@ -207,7 +209,7 @@ bool URLRequestTestJob::IsRedirectResponse(GURL* location, void URLRequestTestJob::Kill() { stage_ = DONE; - net::URLRequestJob::Kill(); + URLRequestJob::Kill(); } void URLRequestTestJob::ProcessNextOperation() { @@ -244,18 +246,20 @@ void URLRequestTestJob::AdvanceJob() { this, &URLRequestTestJob::ProcessNextOperation)); return; } - pending_jobs.push_back(scoped_refptr<URLRequestTestJob>(this)); + g_pending_jobs.push_back(scoped_refptr<URLRequestTestJob>(this)); } // static bool URLRequestTestJob::ProcessOnePendingMessage() { - if (pending_jobs.empty()) + if (g_pending_jobs.empty()) return false; - scoped_refptr<URLRequestTestJob> next_job(pending_jobs[0]); - pending_jobs.erase(pending_jobs.begin()); + scoped_refptr<URLRequestTestJob> next_job(g_pending_jobs[0]); + g_pending_jobs.erase(g_pending_jobs.begin()); DCHECK(!next_job->auto_advance()); // auto_advance jobs should be in this q next_job->ProcessNextOperation(); return true; } + +} // namespace net diff --git a/net/url_request/url_request_test_job.h b/net/url_request/url_request_test_job.h index ec92dc2..252c173 100644 --- a/net/url_request/url_request_test_job.h +++ b/net/url_request/url_request_test_job.h @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -11,6 +11,8 @@ #include "net/url_request/url_request.h" #include "net/url_request/url_request_job.h" +namespace net { + // This job type is designed to help with simple unit tests. To use, you // probably want to inherit from it to set up the state you want. Then install // it as the protocol handler for the "test" scheme. @@ -33,20 +35,20 @@ // // Optionally, you can also construct test jobs that advance automatically // without having to call ProcessOnePendingMessage. -class URLRequestTestJob : public net::URLRequestJob { +class URLRequestTestJob : public URLRequestJob { public: // Constructs a job to return one of the canned responses depending on the // request url, with auto advance disabled. - explicit URLRequestTestJob(net::URLRequest* request); + explicit URLRequestTestJob(URLRequest* request); // Constructs a job to return one of the canned responses depending on the // request url, optionally with auto advance enabled. - explicit URLRequestTestJob(net::URLRequest* request, bool auto_advance); + explicit URLRequestTestJob(URLRequest* request, bool auto_advance); // Constructs a job to return the given response regardless of the request // url. The headers should include the HTTP status line and be formatted as - // expected by net::HttpResponseHeaders. - explicit URLRequestTestJob(net::URLRequest* request, + // expected by HttpResponseHeaders. + explicit URLRequestTestJob(URLRequest* request, const std::string& response_headers, const std::string& response_data, bool auto_advance); @@ -86,14 +88,14 @@ class URLRequestTestJob : public net::URLRequestJob { void set_auto_advance(bool auto_advance) { auto_advance_ = auto_advance; } // Factory method for protocol factory registration if callers don't subclass - static net::URLRequest::ProtocolFactory Factory; + static URLRequest::ProtocolFactory Factory; // Job functions virtual void Start(); - virtual bool ReadRawData(net::IOBuffer* buf, int buf_size, int *bytes_read); + virtual bool ReadRawData(IOBuffer* buf, int buf_size, int *bytes_read); virtual void Kill(); virtual bool GetMimeType(std::string* mime_type) const; - virtual void GetResponseInfo(net::HttpResponseInfo* info); + virtual void GetResponseInfo(HttpResponseInfo* info); virtual int GetResponseCode() const; virtual bool IsRedirectResponse(GURL* location, int* http_status_code); @@ -120,7 +122,7 @@ class URLRequestTestJob : public net::URLRequestJob { // The headers the job should return, will be set in Start() if not provided // in the explicit ctor. - scoped_refptr<net::HttpResponseHeaders> response_headers_; + scoped_refptr<HttpResponseHeaders> response_headers_; // The data to send, will be set in Start() if not provided in the explicit // ctor. @@ -130,8 +132,13 @@ class URLRequestTestJob : public net::URLRequestJob { int offset_; // Holds the buffer for an asynchronous ReadRawData call - net::IOBuffer* async_buf_; + IOBuffer* async_buf_; int async_buf_size_; }; +} // namespace net + +// TODO(tfarina): Fix the callers and remove this! +typedef net::URLRequestTestJob URLRequestTestJob; + #endif // NET_URL_REQUEST_URL_REQUEST_TEST_JOB_H_ diff --git a/net/url_request/view_cache_helper.h b/net/url_request/view_cache_helper.h index 03af714..1952916 100644 --- a/net/url_request/view_cache_helper.h +++ b/net/url_request/view_cache_helper.h @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -11,15 +11,15 @@ #include "net/base/completion_callback.h" #include "net/base/io_buffer.h" -class URLRequestContext; - namespace disk_cache { class Backend; class Entry; -} +} // namespace disk_cache namespace net { +class URLRequestContext; + class ViewCacheHelper { public: ViewCacheHelper(); @@ -29,16 +29,20 @@ class ViewCacheHelper { // If this method returns ERR_IO_PENDING, |callback| will be notified when the // operation completes. |out| must remain valid until this operation completes // or the object is destroyed. - int GetEntryInfoHTML(const std::string& key, URLRequestContext* context, - std::string* out, CompletionCallback* callback); + int GetEntryInfoHTML(const std::string& key, + net::URLRequestContext* context, + std::string* out, + CompletionCallback* callback); // Formats the cache contents as HTML. Returns a net error code. // If this method returns ERR_IO_PENDING, |callback| will be notified when the // operation completes. |out| must remain valid until this operation completes // or the object is destroyed. |url_prefix| will be prepended to each entry // key as a link to the entry. - int GetContentsHTML(URLRequestContext* context, const std::string& url_prefix, - std::string* out, CompletionCallback* callback); + int GetContentsHTML(net::URLRequestContext* context, + const std::string& url_prefix, + std::string* out, + CompletionCallback* callback); private: enum State { @@ -56,8 +60,10 @@ class ViewCacheHelper { }; // Implements GetEntryInfoHTML and GetContentsHTML. - int GetInfoHTML(const std::string& key, URLRequestContext* context, - const std::string& url_prefix, std::string* out, + int GetInfoHTML(const std::string& key, + net::URLRequestContext* context, + const std::string& url_prefix, + std::string* out, CompletionCallback* callback); // This is a helper function used to trigger a completion callback. It may @@ -87,7 +93,7 @@ class ViewCacheHelper { // Called to signal completion of asynchronous IO. void OnIOComplete(int result); - scoped_refptr<URLRequestContext> context_; + scoped_refptr<net::URLRequestContext> context_; disk_cache::Backend* disk_cache_; disk_cache::Entry* entry_; void* iter_; diff --git a/net/websockets/websocket.h b/net/websockets/websocket.h index c729afc..ec1297a 100644 --- a/net/websockets/websocket.h +++ b/net/websockets/websocket.h @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // @@ -74,7 +74,7 @@ class WebSocket : public base::RefCountedThreadSafe<WebSocket>, Request(const GURL& url, const std::string protocol, const std::string origin, const std::string location, ProtocolVersion version, - URLRequestContext* context) + net::URLRequestContext* context) : url_(url), protocol_(protocol), origin_(origin), @@ -90,7 +90,7 @@ class WebSocket : public base::RefCountedThreadSafe<WebSocket>, const std::string& origin() const { return origin_; } const std::string& location() const { return location_; } ProtocolVersion version() const { return version_; } - URLRequestContext* context() const { return context_; } + net::URLRequestContext* context() const { return context_; } // Sets an alternative HostResolver. For testing purposes only. void SetHostResolver(HostResolver* host_resolver) { @@ -113,7 +113,7 @@ class WebSocket : public base::RefCountedThreadSafe<WebSocket>, std::string origin_; std::string location_; ProtocolVersion version_; - scoped_refptr<URLRequestContext> context_; + scoped_refptr<net::URLRequestContext> context_; HostResolver* host_resolver_; ClientSocketFactory* client_socket_factory_; diff --git a/webkit/appcache/appcache_service.h b/webkit/appcache/appcache_service.h index 4e68341..7d200b3 100644 --- a/webkit/appcache/appcache_service.h +++ b/webkit/appcache/appcache_service.h @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -18,7 +18,10 @@ #include "webkit/appcache/appcache_storage.h" class FilePath; + +namespace net { class URLRequestContext; +} // namespace net namespace base { class MessageLoopProxy; @@ -74,8 +77,8 @@ class AppCacheService { // on the IO thread. We do NOT add a reference to the request context, // it is the callers responsibility to ensure that the pointer // remains valid while set. - URLRequestContext* request_context() const { return request_context_; } - void set_request_context(URLRequestContext* context) { + net::URLRequestContext* request_context() const { return request_context_; } + void set_request_context(net::URLRequestContext* context) { request_context_ = context; } @@ -110,7 +113,8 @@ class AppCacheService { scoped_ptr<AppCacheStorage> storage_; PendingAsyncHelpers pending_helpers_; BackendMap backends_; // One 'backend' per child process. - URLRequestContext* request_context_; // Context for use during cache updates. + // Context for use during cache updates. + net::URLRequestContext* request_context_; DISALLOW_COPY_AND_ASSIGN(AppCacheService); }; diff --git a/webkit/fileapi/file_system_operation.h b/webkit/fileapi/file_system_operation.h index e260e24..1b52e22 100644 --- a/webkit/fileapi/file_system_operation.h +++ b/webkit/fileapi/file_system_operation.h @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -22,10 +22,10 @@ class Time; namespace net { class URLRequest; +class URLRequestContext; } // namespace net class GURL; -class URLRequestContext; namespace fileapi { @@ -68,7 +68,7 @@ class FileSystemOperation { virtual void Remove(const FilePath& path, bool recursive); - virtual void Write(scoped_refptr<URLRequestContext> url_request_context, + virtual void Write(scoped_refptr<net::URLRequestContext> url_request_context, const FilePath& path, const GURL& blob_url, int64 offset); diff --git a/webkit/fileapi/sandboxed_file_system_operation.h b/webkit/fileapi/sandboxed_file_system_operation.h index d3e1ce9..bea905d 100644 --- a/webkit/fileapi/sandboxed_file_system_operation.h +++ b/webkit/fileapi/sandboxed_file_system_operation.h @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -47,7 +47,7 @@ class SandboxedFileSystemOperation : public FileSystemOperation { virtual void ReadDirectory(const FilePath& path); virtual void Remove(const FilePath& path, bool recursive); virtual void Write( - scoped_refptr<URLRequestContext> url_request_context, + scoped_refptr<net::URLRequestContext> url_request_context, const FilePath& path, const GURL& blob_url, int64 offset); virtual void Truncate(const FilePath& path, int64 length); virtual void TouchFile(const FilePath& path, diff --git a/webkit/glue/resource_loader_bridge.h b/webkit/glue/resource_loader_bridge.h index 7257b0c..85facfa 100644 --- a/webkit/glue/resource_loader_bridge.h +++ b/webkit/glue/resource_loader_bridge.h @@ -308,7 +308,7 @@ class ResourceLoaderBridge { // Called when the response is complete. This method signals completion of // the resource load.ff - virtual void OnCompletedRequest(const URLRequestStatus& status, + virtual void OnCompletedRequest(const net::URLRequestStatus& status, const std::string& security_info, const base::Time& completion_time) = 0; }; diff --git a/webkit/tools/test_shell/simple_appcache_system.cc b/webkit/tools/test_shell/simple_appcache_system.cc index 155a384..c126849 100644 --- a/webkit/tools/test_shell/simple_appcache_system.cc +++ b/webkit/tools/test_shell/simple_appcache_system.cc @@ -386,7 +386,8 @@ void SimpleAppCacheSystem::InitOnUIThread(const FilePath& cache_directory) { cache_directory_ = cache_directory; } -void SimpleAppCacheSystem::InitOnIOThread(URLRequestContext* request_context) { +void SimpleAppCacheSystem::InitOnIOThread( + net::URLRequestContext* request_context) { if (!is_initailized_on_ui_thread()) return; diff --git a/webkit/tools/test_shell/simple_appcache_system.h b/webkit/tools/test_shell/simple_appcache_system.h index 14fd2f2..d850051 100644 --- a/webkit/tools/test_shell/simple_appcache_system.h +++ b/webkit/tools/test_shell/simple_appcache_system.h @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -23,9 +23,8 @@ class SimpleFrontendProxy; namespace net { class URLRequest; -} // namespace net - class URLRequestContext; +} // namespace net // A class that composes the constituent parts of an appcache system // together for use in a single process with two relavant threads, @@ -50,7 +49,7 @@ class SimpleAppCacheSystem { // at a time, but after IO thread termination a new one can be // started on which this method should be called. The instance // is assumed to outlive the IO thread. - static void InitializeOnIOThread(URLRequestContext* request_context) { + static void InitializeOnIOThread(net::URLRequestContext* request_context) { if (instance_) instance_->InitOnIOThread(request_context); } @@ -116,7 +115,7 @@ class SimpleAppCacheSystem { // Instance methods called by our static public methods void InitOnUIThread(const FilePath& cache_directory); - void InitOnIOThread(URLRequestContext* request_context); + void InitOnIOThread(net::URLRequestContext* request_context); void CleanupIOThread(); WebKit::WebApplicationCacheHost* CreateCacheHostForWebKit( WebKit::WebApplicationCacheHostClient* client); diff --git a/webkit/tools/test_shell/simple_file_writer.h b/webkit/tools/test_shell/simple_file_writer.h index 285fc02..238546e 100644 --- a/webkit/tools/test_shell/simple_file_writer.h +++ b/webkit/tools/test_shell/simple_file_writer.h @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -9,8 +9,9 @@ #include "base/weak_ptr.h" #include "webkit/fileapi/webfilewriter_base.h" +namespace net { class URLRequestContext; - +} // namespace net // An implementation of WebFileWriter for use in test_shell and DRT. class SimpleFileWriter : public fileapi::WebFileWriterBase, @@ -22,7 +23,7 @@ class SimpleFileWriter : public fileapi::WebFileWriterBase, // Called by SimpleResourceLoaderBridge when the context is // created and destroyed. - static void InitializeOnIOThread(URLRequestContext* request_context) { + static void InitializeOnIOThread(net::URLRequestContext* request_context) { request_context_ = request_context; } static void CleanupOnIOThread() { @@ -39,7 +40,7 @@ class SimpleFileWriter : public fileapi::WebFileWriterBase, private: class IOThreadProxy; scoped_refptr<IOThreadProxy> io_thread_proxy_; - static URLRequestContext* request_context_; + static net::URLRequestContext* request_context_; }; #endif // WEBKIT_TOOLS_TEST_SHELL_SIMPLE_FILE_WRITER_H_ diff --git a/webkit/tools/test_shell/simple_socket_stream_bridge.h b/webkit/tools/test_shell/simple_socket_stream_bridge.h index 8840323..a8fd821 100644 --- a/webkit/tools/test_shell/simple_socket_stream_bridge.h +++ b/webkit/tools/test_shell/simple_socket_stream_bridge.h @@ -1,15 +1,17 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef WEBKIT_TOOLS_TEST_SHELL_SIMPLE_SOCKET_STREAM_BRIDGE_H_ #define WEBKIT_TOOLS_TEST_SHELL_SIMPLE_SOCKET_STREAM_BRIDGE_H_ +namespace net { class URLRequestContext; +} // namespace net class SimpleSocketStreamBridge { public: - static void InitializeOnIOThread(URLRequestContext* request_context); + static void InitializeOnIOThread(net::URLRequestContext* request_context); static void Cleanup(); }; |