diff options
author | sanjeevr@chromium.org <sanjeevr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-31 18:49:34 +0000 |
---|---|---|
committer | sanjeevr@chromium.org <sanjeevr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-31 18:49:34 +0000 |
commit | abe2c035dd58c29f9c5f00807e502baa2cc462bc (patch) | |
tree | 45c383ddc14968e16e050938f73456e13a3fe980 /content | |
parent | 6cfef4d1548e36ecff926bdb148d9d497de4176c (diff) | |
download | chromium_src-abe2c035dd58c29f9c5f00807e502baa2cc462bc.zip chromium_src-abe2c035dd58c29f9c5f00807e502baa2cc462bc.tar.gz chromium_src-abe2c035dd58c29f9c5f00807e502baa2cc462bc.tar.bz2 |
Moved URLRequestContextGetter to net/ so it can be used by projects such as jingle.
BUG=None
TEST=Build.
Review URL: http://codereview.chromium.org/6778025
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80033 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
37 files changed, 114 insertions, 78 deletions
diff --git a/content/browser/appcache/appcache_dispatcher_host.cc b/content/browser/appcache/appcache_dispatcher_host.cc index 840cd37..b4dc118 100644 --- a/content/browser/appcache/appcache_dispatcher_host.cc +++ b/content/browser/appcache/appcache_dispatcher_host.cc @@ -20,7 +20,7 @@ AppCacheDispatcherHost::AppCacheDispatcherHost( } AppCacheDispatcherHost::AppCacheDispatcherHost( - URLRequestContextGetter* request_context_getter, + net::URLRequestContextGetter* request_context_getter, int process_id) : ALLOW_THIS_IN_INITIALIZER_LIST(frontend_proxy_(this)), request_context_getter_(request_context_getter), diff --git a/content/browser/appcache/appcache_dispatcher_host.h b/content/browser/appcache/appcache_dispatcher_host.h index 284ef7a..8ff8044 100644 --- a/content/browser/appcache/appcache_dispatcher_host.h +++ b/content/browser/appcache/appcache_dispatcher_host.h @@ -17,10 +17,10 @@ #include "webkit/appcache/appcache_backend_impl.h" class ChromeAppCacheService; -class URLRequestContextGetter; namespace net { class URLRequestContext; +class URLRequestContextGetter; } // namespace net // Handles appcache related messages sent to the main browser process from @@ -34,7 +34,7 @@ class AppCacheDispatcherHost : public BrowserMessageFilter { int process_id); // Constructor for use on the UI thread. - AppCacheDispatcherHost(URLRequestContextGetter* request_context_getter, + AppCacheDispatcherHost(net::URLRequestContextGetter* request_context_getter, int process_id); ~AppCacheDispatcherHost(); @@ -81,7 +81,7 @@ class AppCacheDispatcherHost : public BrowserMessageFilter { // Temporary until OnChannelConnected() can be called from the IO thread, // which will extract the AppCacheService from the net::URLRequestContext. scoped_refptr<net::URLRequestContext> request_context_; - scoped_refptr<URLRequestContextGetter> request_context_getter_; + scoped_refptr<net::URLRequestContextGetter> request_context_getter_; scoped_ptr<appcache::GetStatusCallback> get_status_callback_; scoped_ptr<appcache::StartUpdateCallback> start_update_callback_; diff --git a/content/browser/file_system/file_system_dispatcher_host.h b/content/browser/file_system/file_system_dispatcher_host.h index c5bbafe..8e22b45 100644 --- a/content/browser/file_system/file_system_dispatcher_host.h +++ b/content/browser/file_system/file_system_dispatcher_host.h @@ -23,10 +23,10 @@ class HostContentSettingsMap; class Profile; class Receiver; class RenderMessageFilter; -class URLRequestContextGetter; namespace net { class URLRequestContext; +class URLRequestContextGetter; } // namespace net namespace fileapi { @@ -95,7 +95,7 @@ class FileSystemDispatcherHost : public BrowserMessageFilter { // This holds the URLRequestContextGetter until Init() can be called from the // IO thread, which will extract the net::URLRequestContext from it. - scoped_refptr<URLRequestContextGetter> request_context_getter_; + scoped_refptr<net::URLRequestContextGetter> request_context_getter_; scoped_refptr<net::URLRequestContext> request_context_; DISALLOW_COPY_AND_ASSIGN(FileSystemDispatcherHost); diff --git a/content/browser/geolocation/arbitrator_dependency_factories_for_test.cc b/content/browser/geolocation/arbitrator_dependency_factories_for_test.cc index 78a90c8..210d6139 100644 --- a/content/browser/geolocation/arbitrator_dependency_factories_for_test.cc +++ b/content/browser/geolocation/arbitrator_dependency_factories_for_test.cc @@ -17,7 +17,7 @@ LocationProviderBase* GeolocationArbitratorDependencyFactoryWithLocationProvider:: NewNetworkLocationProvider( AccessTokenStore* access_token_store, - URLRequestContextGetter* context, + net::URLRequestContextGetter* context, const GURL& url, const string16& access_token) { return factory_function_(); diff --git a/content/browser/geolocation/arbitrator_dependency_factories_for_test.h b/content/browser/geolocation/arbitrator_dependency_factories_for_test.h index 6023ad3..f05c00b7 100644 --- a/content/browser/geolocation/arbitrator_dependency_factories_for_test.h +++ b/content/browser/geolocation/arbitrator_dependency_factories_for_test.h @@ -19,7 +19,7 @@ class GeolocationArbitratorDependencyFactoryWithLocationProvider virtual LocationProviderBase* NewNetworkLocationProvider( AccessTokenStore* access_token_store, - URLRequestContextGetter* context, + net::URLRequestContextGetter* context, const GURL& url, const string16& access_token); diff --git a/content/browser/geolocation/arbitrator_dependency_factory.cc b/content/browser/geolocation/arbitrator_dependency_factory.cc index b8a5853..7dd9c34 100644 --- a/content/browser/geolocation/arbitrator_dependency_factory.cc +++ b/content/browser/geolocation/arbitrator_dependency_factory.cc @@ -14,7 +14,7 @@ GeolocationArbitratorDependencyFactory:: } // DefaultGeolocationArbitratorDependencyFactory -URLRequestContextGetter* +net::URLRequestContextGetter* DefaultGeolocationArbitratorDependencyFactory::GetContextGetter() { return Profile::GetDefaultRequestContext(); } @@ -32,7 +32,7 @@ DefaultGeolocationArbitratorDependencyFactory::NewAccessTokenStore() { LocationProviderBase* DefaultGeolocationArbitratorDependencyFactory::NewNetworkLocationProvider( AccessTokenStore* access_token_store, - URLRequestContextGetter* context, + net::URLRequestContextGetter* context, const GURL& url, const string16& access_token) { return ::NewNetworkLocationProvider(access_token_store, context, diff --git a/content/browser/geolocation/arbitrator_dependency_factory.h b/content/browser/geolocation/arbitrator_dependency_factory.h index d026c23..1adaeaf 100644 --- a/content/browser/geolocation/arbitrator_dependency_factory.h +++ b/content/browser/geolocation/arbitrator_dependency_factory.h @@ -12,12 +12,15 @@ class AccessTokenStore; class GURL; class LocationProviderBase; -class URLRequestContextGetter; namespace base { class Time; } +namespace net { +class URLRequestContextGetter; +} + // Allows injection of factory methods for creating the location providers. // RefCounted for simplicity of writing tests. class GeolocationArbitratorDependencyFactory @@ -27,11 +30,11 @@ class GeolocationArbitratorDependencyFactory typedef base::Time (*GetTimeNow)(); virtual GetTimeNow GetTimeFunction() = 0; - virtual URLRequestContextGetter* GetContextGetter() = 0; + virtual net::URLRequestContextGetter* GetContextGetter() = 0; virtual AccessTokenStore* NewAccessTokenStore() = 0; virtual LocationProviderBase* NewNetworkLocationProvider( AccessTokenStore* access_token_store, - URLRequestContextGetter* context, + net::URLRequestContextGetter* context, const GURL& url, const string16& access_token) = 0; virtual LocationProviderBase* NewSystemLocationProvider() = 0; @@ -47,12 +50,12 @@ class DefaultGeolocationArbitratorDependencyFactory : public GeolocationArbitratorDependencyFactory { public: // GeolocationArbitratorDependencyFactory - virtual URLRequestContextGetter* GetContextGetter(); + virtual net::URLRequestContextGetter* GetContextGetter(); virtual GetTimeNow GetTimeFunction(); virtual AccessTokenStore* NewAccessTokenStore(); virtual LocationProviderBase* NewNetworkLocationProvider( AccessTokenStore* access_token_store, - URLRequestContextGetter* context, + net::URLRequestContextGetter* context, const GURL& url, const string16& access_token); virtual LocationProviderBase* NewSystemLocationProvider(); diff --git a/content/browser/geolocation/geolocation_provider_unittest.cc b/content/browser/geolocation/geolocation_provider_unittest.cc index 5cce1fc..da6317d 100644 --- a/content/browser/geolocation/geolocation_provider_unittest.cc +++ b/content/browser/geolocation/geolocation_provider_unittest.cc @@ -91,7 +91,7 @@ class MockDependencyFactory : public GeolocationArbitratorDependencyFactory { access_token_store_(access_token_store) { } - virtual URLRequestContextGetter* GetContextGetter() { + virtual net::URLRequestContextGetter* GetContextGetter() { return NULL; } @@ -105,7 +105,7 @@ class MockDependencyFactory : public GeolocationArbitratorDependencyFactory { virtual LocationProviderBase* NewNetworkLocationProvider( AccessTokenStore* access_token_store, - URLRequestContextGetter* context, + net::URLRequestContextGetter* context, const GURL& url, const string16& access_token) { return new StartStopMockLocationProvider(test_loop_); diff --git a/content/browser/geolocation/location_arbitrator.h b/content/browser/geolocation/location_arbitrator.h index 3409f81e..264ca1a 100644 --- a/content/browser/geolocation/location_arbitrator.h +++ b/content/browser/geolocation/location_arbitrator.h @@ -9,18 +9,22 @@ #include "base/memory/scoped_vector.h" #include "base/string16.h" #include "base/time.h" -#include "chrome/common/net/url_request_context_getter.h" #include "content/browser/geolocation/access_token_store.h" #include "content/browser/geolocation/location_provider.h" #include "content/browser/geolocation/geolocation_observer.h" #include "content/common/geoposition.h" #include "googleurl/src/gurl.h" +#include "net/url_request/url_request_context_getter.h" class AccessTokenStore; class GeolocationArbitratorDependencyFactory; class GURL; class LocationProviderBase; + +namespace net { class URLRequestContextGetter; +} + struct Geoposition; // This class is responsible for handling updates from multiple underlying @@ -82,7 +86,7 @@ class GeolocationArbitrator : public LocationProviderBase::ListenerInterface { scoped_refptr<GeolocationArbitratorDependencyFactory> dependency_factory_; scoped_refptr<AccessTokenStore> access_token_store_; - scoped_refptr<URLRequestContextGetter> context_getter_; + scoped_refptr<net::URLRequestContextGetter> context_getter_; GetTimeNow get_time_now_; GeolocationObserver* observer_; ScopedVector<LocationProviderBase> providers_; diff --git a/content/browser/geolocation/location_arbitrator_unittest.cc b/content/browser/geolocation/location_arbitrator_unittest.cc index dcea225..327af85 100644 --- a/content/browser/geolocation/location_arbitrator_unittest.cc +++ b/content/browser/geolocation/location_arbitrator_unittest.cc @@ -68,7 +68,7 @@ class MockDependencyFactory : public GeolocationArbitratorDependencyFactory { virtual GeolocationArbitrator::GetTimeNow GetTimeFunction() { return GetTimeNowForTest; } - virtual URLRequestContextGetter* GetContextGetter() { + virtual net::URLRequestContextGetter* GetContextGetter() { return NULL; } virtual AccessTokenStore* NewAccessTokenStore() { @@ -76,7 +76,7 @@ class MockDependencyFactory : public GeolocationArbitratorDependencyFactory { } virtual LocationProviderBase* NewNetworkLocationProvider( AccessTokenStore* access_token_store, - URLRequestContextGetter* context, + net::URLRequestContextGetter* context, const GURL& url, const string16& access_token) { return new MockLocationProvider(&cell_); diff --git a/content/browser/geolocation/location_provider.h b/content/browser/geolocation/location_provider.h index 402ae75..2c33e7d 100644 --- a/content/browser/geolocation/location_provider.h +++ b/content/browser/geolocation/location_provider.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,10 @@ class AccessTokenStore; struct Geoposition; class GURL; + +namespace net { class URLRequestContextGetter; +} // The base class used by all location providers. class LocationProviderBase : public base::NonThreadSafe { @@ -89,7 +92,7 @@ class LocationProviderBase : public base::NonThreadSafe { // over the platform-dependent implementations. LocationProviderBase* NewNetworkLocationProvider( AccessTokenStore* access_token_store, - URLRequestContextGetter* context, + net::URLRequestContextGetter* context, const GURL& url, const string16& access_token); LocationProviderBase* NewSystemLocationProvider(); diff --git a/content/browser/geolocation/network_location_provider.cc b/content/browser/geolocation/network_location_provider.cc index d209396..3759b1a 100644 --- a/content/browser/geolocation/network_location_provider.cc +++ b/content/browser/geolocation/network_location_provider.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. @@ -106,7 +106,7 @@ bool NetworkLocationProvider::PositionCache::MakeKey( // NetworkLocationProvider factory function LocationProviderBase* NewNetworkLocationProvider( AccessTokenStore* access_token_store, - URLRequestContextGetter* context, + net::URLRequestContextGetter* context, const GURL& url, const string16& access_token) { return new NetworkLocationProvider( @@ -116,7 +116,7 @@ LocationProviderBase* NewNetworkLocationProvider( // NetworkLocationProvider NetworkLocationProvider::NetworkLocationProvider( AccessTokenStore* access_token_store, - URLRequestContextGetter* url_context_getter, + net::URLRequestContextGetter* url_context_getter, const GURL& url, const string16& access_token) : access_token_store_(access_token_store), diff --git a/content/browser/geolocation/network_location_provider.h b/content/browser/geolocation/network_location_provider.h index 41a726e..a7a4eb9 100644 --- a/content/browser/geolocation/network_location_provider.h +++ b/content/browser/geolocation/network_location_provider.h @@ -69,7 +69,7 @@ class NetworkLocationProvider }; NetworkLocationProvider(AccessTokenStore* access_token_store, - URLRequestContextGetter* context, + net::URLRequestContextGetter* context, const GURL& url, const string16& access_token); virtual ~NetworkLocationProvider(); diff --git a/content/browser/geolocation/network_location_request.cc b/content/browser/geolocation/network_location_request.cc index ec02d18..74c9a0d 100644 --- a/content/browser/geolocation/network_location_request.cc +++ b/content/browser/geolocation/network_location_request.cc @@ -9,9 +9,9 @@ #include "base/string_number_conversions.h" #include "base/utf_string_conversions.h" #include "base/values.h" -#include "chrome/common/net/url_request_context_getter.h" #include "content/common/geoposition.h" #include "net/base/load_flags.h" +#include "net/url_request/url_request_context_getter.h" #include "net/url_request/url_request_status.h" namespace { @@ -75,11 +75,12 @@ void AddWifiData(const WifiData& wifi_data, int NetworkLocationRequest::url_fetcher_id_for_tests = 0; -NetworkLocationRequest::NetworkLocationRequest(URLRequestContextGetter* context, - const GURL& url, - ListenerInterface* listener) - : url_context_(context), listener_(listener), - url_(url) { +NetworkLocationRequest::NetworkLocationRequest( + net::URLRequestContextGetter* context, + const GURL& url, + ListenerInterface* listener) + : url_context_(context), listener_(listener), + url_(url) { DCHECK(listener); } diff --git a/content/browser/geolocation/network_location_request.h b/content/browser/geolocation/network_location_request.h index 073ed05..18caaa5 100644 --- a/content/browser/geolocation/network_location_request.h +++ b/content/browser/geolocation/network_location_request.h @@ -15,8 +15,12 @@ #include "content/browser/geolocation/device_data_provider.h" #include "googleurl/src/gurl.h" -class URLRequestContextGetter; class URLFetcher; + +namespace net { +class URLRequestContextGetter; +} + struct Geoposition; struct Position; @@ -44,7 +48,7 @@ class NetworkLocationRequest : private URLFetcher::Delegate { }; // |url| is the server address to which the request wil be sent. - NetworkLocationRequest(URLRequestContextGetter* context, + NetworkLocationRequest(net::URLRequestContextGetter* context, const GURL& url, ListenerInterface* listener); virtual ~NetworkLocationRequest(); @@ -70,7 +74,7 @@ class NetworkLocationRequest : private URLFetcher::Delegate { const ResponseCookies& cookies, const std::string& data); - scoped_refptr<URLRequestContextGetter> url_context_; + scoped_refptr<net::URLRequestContextGetter> url_context_; ListenerInterface* listener_; const GURL url_; scoped_ptr<URLFetcher> url_fetcher_; diff --git a/content/browser/plugin_process_host.cc b/content/browser/plugin_process_host.cc index e6f245d3..d7a02fb 100644 --- a/content/browser/plugin_process_host.cc +++ b/content/browser/plugin_process_host.cc @@ -27,7 +27,6 @@ #include "chrome/common/chrome_paths.h" #include "chrome/common/chrome_switches.h" #include "chrome/common/logging_chrome.h" -#include "chrome/common/net/url_request_context_getter.h" #include "chrome/common/render_messages.h" #include "content/browser/browser_thread.h" #include "content/browser/plugin_service.h" @@ -39,6 +38,7 @@ #include "net/base/io_buffer.h" #include "net/url_request/url_request.h" #include "net/url_request/url_request_context.h" +#include "net/url_request/url_request_context_getter.h" #include "ui/base/ui_base_switches.h" #include "ui/gfx/native_widget_types.h" #include "ui/gfx/gl/gl_switches.h" diff --git a/content/browser/renderer_host/mock_render_process_host.h b/content/browser/renderer_host/mock_render_process_host.h index ff6e599..5dc8ed4 100644 --- a/content/browser/renderer_host/mock_render_process_host.h +++ b/content/browser/renderer_host/mock_render_process_host.h @@ -13,7 +13,10 @@ class MockRenderProcessHostFactory; class TransportDIB; + +namespace net { class URLRequestContextGetter; +} // A mock render process host that has no corresponding renderer process. All // IPC messages are sent into the message sink for inspection by tests. diff --git a/content/browser/renderer_host/pepper_message_filter.h b/content/browser/renderer_host/pepper_message_filter.h index 456fd82..35adc97 100644 --- a/content/browser/renderer_host/pepper_message_filter.h +++ b/content/browser/renderer_host/pepper_message_filter.h @@ -14,10 +14,10 @@ #include "ppapi/c/private/ppb_flash_net_connector.h" class Profile; -class URLRequestContextGetter; namespace net { class AddressList; +class URLRequestContextGetter; } class PepperMessageFilter : public BrowserMessageFilter { @@ -63,7 +63,7 @@ class PepperMessageFilter : public BrowserMessageFilter { #endif // ENABLE_FLAPPER_HACKS Profile* profile_; - scoped_refptr<URLRequestContextGetter> request_context_; + scoped_refptr<net::URLRequestContextGetter> request_context_; }; #endif // CONTENT_BROWSER_RENDERER_HOST_PEPPER_MESSAGE_FILTER_H_ diff --git a/content/browser/renderer_host/render_message_filter.cc b/content/browser/renderer_host/render_message_filter.cc index 14805f4..68a81f2 100644 --- a/content/browser/renderer_host/render_message_filter.cc +++ b/content/browser/renderer_host/render_message_filter.cc @@ -265,7 +265,7 @@ RenderMessageFilter::RenderMessageFilter( int render_process_id, PluginService* plugin_service, Profile* profile, - URLRequestContextGetter* request_context, + net::URLRequestContextGetter* request_context, RenderWidgetHelper* render_widget_helper) : resource_dispatcher_host_(g_browser_process->resource_dispatcher_host()), plugin_service_(plugin_service), @@ -779,7 +779,7 @@ void RenderMessageFilter::UpdateHostZoomLevelsOnUIThread( ChromeURLRequestContext* RenderMessageFilter::GetRequestContextForURL( const GURL& url) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); - URLRequestContextGetter* context_getter = + net::URLRequestContextGetter* context_getter = url.SchemeIs(chrome::kExtensionScheme) ? extensions_request_context_ : request_context_; return static_cast<ChromeURLRequestContext*>( diff --git a/content/browser/renderer_host/render_message_filter.h b/content/browser/renderer_host/render_message_filter.h index 7325a60..10cc962 100644 --- a/content/browser/renderer_host/render_message_filter.h +++ b/content/browser/renderer_host/render_message_filter.h @@ -34,7 +34,6 @@ class HostZoomMap; class NotificationsPrefsCache; class Profile; class RenderWidgetHelper; -class URLRequestContextGetter; struct ViewHostMsg_CreateWindow_Params; struct ViewHostMsg_CreateWorker_Params; @@ -50,6 +49,7 @@ class SharedMemory; namespace net { class CookieStore; +class URLRequestContextGetter; } // This class filters out incoming IPC messages for the renderer process on the @@ -60,7 +60,7 @@ class RenderMessageFilter : public BrowserMessageFilter { RenderMessageFilter(int render_process_id, PluginService* plugin_service, Profile* profile, - URLRequestContextGetter* request_context, + net::URLRequestContextGetter* request_context, RenderWidgetHelper* render_widget_helper); // BrowserMessageFilter methods: @@ -240,10 +240,10 @@ class RenderMessageFilter : public BrowserMessageFilter { HostContentSettingsMap* content_settings_; // Contextual information to be used for requests created here. - scoped_refptr<URLRequestContextGetter> request_context_; + scoped_refptr<net::URLRequestContextGetter> request_context_; // A request context that holds a cookie store for chrome-extension URLs. - scoped_refptr<URLRequestContextGetter> extensions_request_context_; + scoped_refptr<net::URLRequestContextGetter> extensions_request_context_; scoped_refptr<RenderWidgetHelper> render_widget_helper_; diff --git a/content/browser/renderer_host/render_process_host.h b/content/browser/renderer_host/render_process_host.h index d389bdf..a954d02 100644 --- a/content/browser/renderer_host/render_process_host.h +++ b/content/browser/renderer_host/render_process_host.h @@ -18,13 +18,16 @@ #include "ui/gfx/surface/transport_dib.h" class Profile; -class URLRequestContextGetter; struct ViewMsg_ClosePage_Params; namespace base { class SharedMemory; } +namespace net { +class URLRequestContextGetter; +} + // Virtual interface that represents the browser side of the browser <-> // renderer communication channel. There will generally be one // RenderProcessHost per renderer process. diff --git a/content/browser/renderer_host/render_view_host.cc b/content/browser/renderer_host/render_view_host.cc index bf91d391..f305870 100644 --- a/content/browser/renderer_host/render_view_host.cc +++ b/content/browser/renderer_host/render_view_host.cc @@ -24,7 +24,6 @@ #include "chrome/common/chrome_constants.h" #include "chrome/common/chrome_switches.h" #include "chrome/common/extensions/extension_messages.h" -#include "chrome/common/net/url_request_context_getter.h" #include "chrome/common/render_messages.h" #include "chrome/common/print_messages.h" #include "chrome/common/safebrowsing_messages.h" @@ -48,6 +47,7 @@ #include "content/common/result_codes.h" #include "content/common/view_messages.h" #include "net/base/net_util.h" +#include "net/url_request/url_request_context_getter.h" #include "third_party/skia/include/core/SkBitmap.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebFindOptions.h" #include "ui/gfx/native_widget_types.h" diff --git a/content/browser/renderer_host/render_view_host.h b/content/browser/renderer_host/render_view_host.h index d40b8c7..ff2a4d6 100644 --- a/content/browser/renderer_host/render_view_host.h +++ b/content/browser/renderer_host/render_view_host.h @@ -63,7 +63,9 @@ namespace WebKit { struct WebMediaPlayerAction; } // namespace WebKit +namespace net { class URLRequestContextGetter; +} // // RenderViewHost diff --git a/content/browser/renderer_host/resource_message_filter.cc b/content/browser/renderer_host/resource_message_filter.cc index a4b4b8a..fe490f8 100644 --- a/content/browser/renderer_host/resource_message_filter.cc +++ b/content/browser/renderer_host/resource_message_filter.cc @@ -42,7 +42,7 @@ ChromeURLRequestContext* ResourceMessageFilter::GetURLRequestContext( rv = url_request_context_override_->GetRequestContext(type); if (!rv) { - URLRequestContextGetter* context_getter = + net::URLRequestContextGetter* context_getter = Profile::GetDefaultRequestContext(); if (context_getter) rv = context_getter->GetURLRequestContext(); diff --git a/content/browser/renderer_host/socket_stream_dispatcher_host.cc b/content/browser/renderer_host/socket_stream_dispatcher_host.cc index c1e6ad4..2bfb58c 100644 --- a/content/browser/renderer_host/socket_stream_dispatcher_host.cc +++ b/content/browser/renderer_host/socket_stream_dispatcher_host.cc @@ -6,11 +6,11 @@ #include "base/logging.h" #include "chrome/browser/profiles/profile.h" -#include "chrome/common/net/url_request_context_getter.h" #include "content/browser/renderer_host/socket_stream_host.h" #include "content/common/socket_stream.h" #include "content/common/socket_stream_messages.h" #include "content/common/resource_messages.h" +#include "net/url_request/url_request_context_getter.h" #include "net/websockets/websocket_job.h" #include "net/websockets/websocket_throttle.h" @@ -154,7 +154,7 @@ net::URLRequestContext* SocketStreamDispatcherHost::GetURLRequestContext() { ResourceType::SUB_RESOURCE); } if (!rv) { - URLRequestContextGetter* context_getter = + net::URLRequestContextGetter* context_getter = Profile::GetDefaultRequestContext(); if (context_getter) rv = context_getter->GetURLRequestContext(); diff --git a/content/browser/speech/speech_recognition_request.cc b/content/browser/speech/speech_recognition_request.cc index f80d026..7d66aa7 100644 --- a/content/browser/speech/speech_recognition_request.cc +++ b/content/browser/speech/speech_recognition_request.cc @@ -10,10 +10,10 @@ #include "base/string_number_conversions.h" #include "base/string_util.h" #include "base/values.h" -#include "chrome/common/net/url_request_context_getter.h" #include "net/base/escape.h" #include "net/base/load_flags.h" #include "net/url_request/url_request_context.h" +#include "net/url_request/url_request_context_getter.h" #include "net/url_request/url_request_status.h" #include "ui/base/l10n/l10n_util.h" @@ -113,7 +113,7 @@ namespace speech_input { int SpeechRecognitionRequest::url_fetcher_id_for_tests = 0; SpeechRecognitionRequest::SpeechRecognitionRequest( - URLRequestContextGetter* context, Delegate* delegate) + net::URLRequestContextGetter* context, Delegate* delegate) : url_context_(context), delegate_(delegate) { DCHECK(delegate); diff --git a/content/browser/speech/speech_recognition_request.h b/content/browser/speech/speech_recognition_request.h index 7992e6e..5b00563 100644 --- a/content/browser/speech/speech_recognition_request.h +++ b/content/browser/speech/speech_recognition_request.h @@ -16,7 +16,10 @@ #include "googleurl/src/gurl.h" class URLFetcher; + +namespace net { class URLRequestContextGetter; +} namespace speech_input { @@ -38,7 +41,7 @@ class SpeechRecognitionRequest : public URLFetcher::Delegate { }; // |url| is the server address to which the request wil be sent. - SpeechRecognitionRequest(URLRequestContextGetter* context, + SpeechRecognitionRequest(net::URLRequestContextGetter* context, Delegate* delegate); virtual ~SpeechRecognitionRequest(); @@ -66,7 +69,7 @@ class SpeechRecognitionRequest : public URLFetcher::Delegate { const std::string& data); private: - scoped_refptr<URLRequestContextGetter> url_context_; + scoped_refptr<net::URLRequestContextGetter> url_context_; Delegate* delegate_; scoped_ptr<URLFetcher> url_fetcher_; diff --git a/content/browser/speech/speech_recognition_request_unittest.cc b/content/browser/speech/speech_recognition_request_unittest.cc index 865f099..1097709 100644 --- a/content/browser/speech/speech_recognition_request_unittest.cc +++ b/content/browser/speech/speech_recognition_request_unittest.cc @@ -3,9 +3,9 @@ // found in the LICENSE file. #include "base/utf_string_conversions.h" -#include "chrome/common/net/url_request_context_getter.h" #include "chrome/common/net/test_url_fetcher_factory.h" #include "content/browser/speech/speech_recognition_request.h" +#include "net/url_request/url_request_context_getter.h" #include "net/url_request/url_request_status.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/content/browser/speech/speech_recognizer.cc b/content/browser/speech/speech_recognizer.cc index d84e634..1807db0 100644 --- a/content/browser/speech/speech_recognizer.cc +++ b/content/browser/speech/speech_recognizer.cc @@ -6,8 +6,8 @@ #include "base/time.h" #include "chrome/browser/profiles/profile.h" -#include "chrome/common/net/url_request_context_getter.h" #include "content/browser/browser_thread.h" +#include "net/url_request/url_request_context_getter.h" using media::AudioInputController; using std::string; diff --git a/content/browser/tab_contents/interstitial_page.cc b/content/browser/tab_contents/interstitial_page.cc index aca0108..d18a9d9 100644 --- a/content/browser/tab_contents/interstitial_page.cc +++ b/content/browser/tab_contents/interstitial_page.cc @@ -17,7 +17,6 @@ #include "chrome/browser/profiles/profile.h" #include "chrome/browser/renderer_preferences_util.h" #include "chrome/common/bindings_policy.h" -#include "chrome/common/net/url_request_context_getter.h" #include "content/browser/browser_thread.h" #include "content/browser/renderer_host/render_process_host.h" #include "content/browser/renderer_host/render_view_host.h" @@ -34,6 +33,7 @@ #include "content/common/page_transition_types.h" #include "content/common/view_messages.h" #include "net/base/escape.h" +#include "net/url_request/url_request_context_getter.h" using WebKit::WebDragOperation; using WebKit::WebDragOperationsMask; diff --git a/content/browser/tab_contents/tab_contents.cc b/content/browser/tab_contents/tab_contents.cc index 61bc4b5..26b6ea3 100644 --- a/content/browser/tab_contents/tab_contents.cc +++ b/content/browser/tab_contents/tab_contents.cc @@ -61,7 +61,6 @@ #include "chrome/common/extensions/extension_messages.h" #include "chrome/common/extensions/extension_resource.h" #include "chrome/common/extensions/url_pattern.h" -#include "chrome/common/net/url_request_context_getter.h" #include "chrome/common/pref_names.h" #include "chrome/common/render_messages.h" #include "chrome/common/url_constants.h" @@ -87,6 +86,7 @@ #include "content/common/view_messages.h" #include "net/base/net_util.h" #include "net/base/registry_controlled_domain.h" +#include "net/url_request/url_request_context_getter.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" #include "ui/base/resource/resource_bundle.h" #include "ui/gfx/codec/png_codec.h" diff --git a/content/browser/worker_host/worker_message_filter.cc b/content/browser/worker_host/worker_message_filter.cc index 7edb8de..980f22c 100644 --- a/content/browser/worker_host/worker_message_filter.cc +++ b/content/browser/worker_host/worker_message_filter.cc @@ -1,19 +1,19 @@ -// 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. #include "content/browser/worker_host/worker_message_filter.h" #include "chrome/browser/net/chrome_url_request_context.h" -#include "chrome/common/net/url_request_context_getter.h" #include "content/browser/worker_host/message_port_service.h" #include "content/browser/worker_host/worker_service.h" #include "content/common/view_messages.h" #include "content/common/worker_messages.h" +#include "net/url_request/url_request_context_getter.h" WorkerMessageFilter::WorkerMessageFilter( int render_process_id, - URLRequestContextGetter* request_context, + net::URLRequestContextGetter* request_context, ResourceDispatcherHost* resource_dispatcher_host, CallbackWithReturnValue<int>::Type* next_routing_id) : render_process_id_(render_process_id), diff --git a/content/browser/worker_host/worker_message_filter.h b/content/browser/worker_host/worker_message_filter.h index f2de440..3ffb2bb 100644 --- a/content/browser/worker_host/worker_message_filter.h +++ b/content/browser/worker_host/worker_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. @@ -9,7 +9,11 @@ #include "content/browser/browser_message_filter.h" class ResourceDispatcherHost; + +namespace net { class URLRequestContextGetter; +} + struct ViewHostMsg_CreateWorker_Params; class WorkerMessageFilter : public BrowserMessageFilter { @@ -18,7 +22,7 @@ class WorkerMessageFilter : public BrowserMessageFilter { // OnChannelClosing. WorkerMessageFilter( int render_process_id, - URLRequestContextGetter* request_context, + net::URLRequestContextGetter* request_context, ResourceDispatcherHost* resource_dispatcher_host, CallbackWithReturnValue<int>::Type* next_routing_id); @@ -49,7 +53,7 @@ class WorkerMessageFilter : public BrowserMessageFilter { void OnCreateMessagePort(int* route_id, int* message_port_id); int render_process_id_; - scoped_refptr<URLRequestContextGetter> request_context_; + scoped_refptr<net::URLRequestContextGetter> request_context_; ResourceDispatcherHost* resource_dispatcher_host_; // This is guaranteed to be valid until OnChannelClosing is closed, and it's diff --git a/content/browser/worker_host/worker_process_host.cc b/content/browser/worker_host/worker_process_host.cc index 84b29ad..283874f 100644 --- a/content/browser/worker_host/worker_process_host.cc +++ b/content/browser/worker_host/worker_process_host.cc @@ -87,7 +87,7 @@ class WorkerCrashTask : public Task { WorkerProcessHost::WorkerProcessHost( ResourceDispatcherHost* resource_dispatcher_host, - URLRequestContextGetter* request_context) + net::URLRequestContextGetter* request_context) : BrowserChildProcessHost(WORKER_PROCESS, resource_dispatcher_host), request_context_(request_context) { } @@ -506,7 +506,7 @@ WorkerProcessHost::WorkerInstance::WorkerInstance( int parent_process_id, int parent_appcache_host_id, int64 main_resource_appcache_id, - URLRequestContextGetter* request_context) + net::URLRequestContextGetter* request_context) : url_(url), shared_(shared), incognito_(incognito), diff --git a/content/browser/worker_host/worker_process_host.h b/content/browser/worker_host/worker_process_host.h index 7277098..327ca20 100644 --- a/content/browser/worker_host/worker_process_host.h +++ b/content/browser/worker_host/worker_process_host.h @@ -15,7 +15,9 @@ #include "content/browser/worker_host/worker_document_set.h" #include "googleurl/src/gurl.h" +namespace net { class URLRequestContextGetter; +} // The WorkerProcessHost is the interface that represents the browser side of // the browser <-> worker communication channel. There will be one @@ -37,7 +39,7 @@ class WorkerProcessHost : public BrowserChildProcessHost { int parent_process_id, int parent_appcache_host_id, int64 main_resource_appcache_id, - URLRequestContextGetter* request_context); + net::URLRequestContextGetter* request_context); ~WorkerInstance(); // Unique identifier for a worker client. @@ -85,7 +87,7 @@ class WorkerProcessHost : public BrowserChildProcessHost { WorkerDocumentSet* worker_document_set() const { return worker_document_set_; } - URLRequestContextGetter* request_context() const { + net::URLRequestContextGetter* request_context() const { return request_context_; } @@ -100,14 +102,14 @@ class WorkerProcessHost : public BrowserChildProcessHost { int parent_process_id_; int parent_appcache_host_id_; int64 main_resource_appcache_id_; - scoped_refptr<URLRequestContextGetter> request_context_; + scoped_refptr<net::URLRequestContextGetter> request_context_; FilterList filters_; scoped_refptr<WorkerDocumentSet> worker_document_set_; }; WorkerProcessHost( ResourceDispatcherHost* resource_dispatcher_host, - URLRequestContextGetter* request_context); + net::URLRequestContextGetter* request_context); ~WorkerProcessHost(); // Starts the process. Returns true iff it succeeded. @@ -129,7 +131,7 @@ class WorkerProcessHost : public BrowserChildProcessHost { void DocumentDetached(WorkerMessageFilter* filter, unsigned long long document_id); - URLRequestContextGetter* request_context() const { + net::URLRequestContextGetter* request_context() const { return request_context_; } @@ -174,7 +176,7 @@ class WorkerProcessHost : public BrowserChildProcessHost { Instances instances_; - scoped_refptr<URLRequestContextGetter> request_context_; + scoped_refptr<net::URLRequestContextGetter> request_context_; // A reference to the filter associated with this worker process. We need to // keep this around since we'll use it when forward messages to the worker diff --git a/content/browser/worker_host/worker_service.cc b/content/browser/worker_host/worker_service.cc index e7a2cf6..dd30448 100644 --- a/content/browser/worker_host/worker_service.cc +++ b/content/browser/worker_host/worker_service.cc @@ -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. @@ -67,10 +67,11 @@ void WorkerService::OnWorkerMessageFilterClosing(WorkerMessageFilter* filter) { TryStartingQueuedWorker(); } -void WorkerService::CreateWorker(const ViewHostMsg_CreateWorker_Params& params, - int route_id, - WorkerMessageFilter* filter, - URLRequestContextGetter* request_context) { +void WorkerService::CreateWorker( + const ViewHostMsg_CreateWorker_Params& params, + int route_id, + WorkerMessageFilter* filter, + net::URLRequestContextGetter* request_context) { ChromeURLRequestContext* context = static_cast<ChromeURLRequestContext*>( request_context->GetURLRequestContext()); diff --git a/content/browser/worker_host/worker_service.h b/content/browser/worker_host/worker_service.h index 8bbc800..7869dd6 100644 --- a/content/browser/worker_host/worker_service.h +++ b/content/browser/worker_host/worker_service.h @@ -11,7 +11,10 @@ #include "content/browser/worker_host/worker_process_host.h" #include "googleurl/src/gurl.h" +namespace net { class URLRequestContextGetter; +} + struct ViewHostMsg_CreateWorker_Params; // A singelton for managing HTML5 web workers. @@ -24,7 +27,7 @@ class WorkerService { void CreateWorker(const ViewHostMsg_CreateWorker_Params& params, int route_id, WorkerMessageFilter* filter, - URLRequestContextGetter* request_context); + net::URLRequestContextGetter* request_context); void LookupSharedWorker(const ViewHostMsg_CreateWorker_Params& params, int route_id, WorkerMessageFilter* filter, |