diff options
author | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-15 00:21:34 +0000 |
---|---|---|
committer | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-15 00:21:34 +0000 |
commit | aeb53f0e2f6352ec7fbc2113270a97072b42c764 (patch) | |
tree | 1f4da7884df919c21903a7881964273a9f7496fd /chrome/browser | |
parent | ec8962ca7de01eb5685b32a4361dd7be8f7e6293 (diff) | |
download | chromium_src-aeb53f0e2f6352ec7fbc2113270a97072b42c764.zip chromium_src-aeb53f0e2f6352ec7fbc2113270a97072b42c764.tar.gz chromium_src-aeb53f0e2f6352ec7fbc2113270a97072b42c764.tar.bz2 |
net: Remove typedef net::URLRequestContext URLRequestContext;
BUG=64263
TEST=compiled locally, trybots
Review URL: http://codereview.chromium.org/6338002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71522 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
38 files changed, 145 insertions, 137 deletions
diff --git a/chrome/browser/appcache/appcache_dispatcher_host.cc b/chrome/browser/appcache/appcache_dispatcher_host.cc index 8bcf53e..15798ea 100644 --- a/chrome/browser/appcache/appcache_dispatcher_host.cc +++ b/chrome/browser/appcache/appcache_dispatcher_host.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. @@ -12,7 +12,7 @@ #include "chrome/common/render_messages.h" AppCacheDispatcherHost::AppCacheDispatcherHost( - URLRequestContext* request_context, + net::URLRequestContext* request_context, int process_id) : ALLOW_THIS_IN_INITIALIZER_LIST(frontend_proxy_(this)), request_context_(request_context), @@ -37,7 +37,7 @@ void AppCacheDispatcherHost::OnChannelConnected(int32 peer_pid) { DCHECK(request_context_.get() || request_context_getter_.get()); // Get the AppCacheService (it can only be accessed from IO thread). - URLRequestContext* context = request_context_.get(); + net::URLRequestContext* context = request_context_.get(); if (!context) context = request_context_getter_->GetURLRequestContext(); appcache_service_ = diff --git a/chrome/browser/appcache/appcache_dispatcher_host.h b/chrome/browser/appcache/appcache_dispatcher_host.h index 1feca77..527a306 100644 --- a/chrome/browser/appcache/appcache_dispatcher_host.h +++ b/chrome/browser/appcache/appcache_dispatcher_host.h @@ -79,7 +79,7 @@ class AppCacheDispatcherHost : public BrowserMessageFilter { appcache::AppCacheBackendImpl backend_impl_; // Temporary until OnChannelConnected() can be called from the IO thread, - // which will extract the AppCacheService from the URLRequestContext. + // which will extract the AppCacheService from the net::URLRequestContext. scoped_refptr<net::URLRequestContext> request_context_; scoped_refptr<URLRequestContextGetter> request_context_getter_; diff --git a/chrome/browser/appcache/view_appcache_internals_job_factory.cc b/chrome/browser/appcache/view_appcache_internals_job_factory.cc index 99ef75f..6de6a6a 100644 --- a/chrome/browser/appcache/view_appcache_internals_job_factory.cc +++ b/chrome/browser/appcache/view_appcache_internals_job_factory.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. @@ -20,7 +20,7 @@ bool ViewAppCacheInternalsJobFactory::IsSupportedURL(const GURL& url) { // static. net::URLRequestJob* ViewAppCacheInternalsJobFactory::CreateJobForRequest( net::URLRequest* request) { - URLRequestContext* context = request->context(); + net::URLRequestContext* context = request->context(); ChromeURLRequestContext* chrome_request_context = reinterpret_cast<ChromeURLRequestContext*>(context); return new appcache::ViewAppCacheInternalsJob( diff --git a/chrome/browser/browser_child_process_host.h b/chrome/browser/browser_child_process_host.h index f917a4d..28ca924 100644 --- a/chrome/browser/browser_child_process_host.h +++ b/chrome/browser/browser_child_process_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. @@ -60,7 +60,7 @@ class BrowserChildProcessHost : public ChildProcessHost, // |resource_dispatcher_host| may be NULL to indicate none is needed for // this process type. // |url_request_context_getter| allows derived classes to override the - // URLRequestContext. + // net::URLRequestContext. BrowserChildProcessHost( ChildProcessInfo::ProcessType type, ResourceDispatcherHost* resource_dispatcher_host, @@ -68,7 +68,7 @@ class BrowserChildProcessHost : public ChildProcessHost, url_request_context_override); // A convenient constructor for those classes that want to use the default - // URLRequestContext. + // net::URLRequestContext. BrowserChildProcessHost( ChildProcessInfo::ProcessType type, ResourceDispatcherHost* resource_dispatcher_host); diff --git a/chrome/browser/chrome_plugin_browsing_context.cc b/chrome/browser/chrome_plugin_browsing_context.cc index a252bbf..ff20485 100644 --- a/chrome/browser/chrome_plugin_browsing_context.cc +++ b/chrome/browser/chrome_plugin_browsing_context.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. @@ -53,7 +53,7 @@ void CPBrowsingContextManager::Observe(NotificationType type, net::URLRequestContext* context = Source<net::URLRequestContext>(source).ptr(); - // Multiple CPBrowsingContexts may refer to the same URLRequestContext. + // Multiple CPBrowsingContexts may refer to the same net::URLRequestContext. for (Map::iterator it(&map_); !it.IsAtEnd(); it.Advance()) { if (it.GetCurrentValue() == context) map_.Remove(it.GetCurrentKey()); diff --git a/chrome/browser/chrome_plugin_browsing_context.h b/chrome/browser/chrome_plugin_browsing_context.h index 9f0eb8f..8eb1b5b 100644 --- a/chrome/browser/chrome_plugin_browsing_context.h +++ b/chrome/browser/chrome_plugin_browsing_context.h @@ -18,10 +18,10 @@ class URLRequestContext; } // namespace net // This class manages the mapping between CPBrowsingContexts and -// URLRequestContexts. It observes when URLRequestContexts go away, and -// invalidates the corresponding CPBrowsingContexts. CPBrowsingContexts can be -// associated with other data as well, so there can be multiple ones referring -// to a given URLRequestContext. +// net::URLRequestContexts. It observes when net::URLRequestContexts go away, +// and invalidates the corresponding CPBrowsingContexts. CPBrowsingContexts can +// be associated with other data as well, so there can be multiple ones +// referring to a given net::URLRequestContext. // Note: This class should be used on the IO thread only. class CPBrowsingContextManager : public NotificationObserver { public: @@ -33,16 +33,16 @@ class CPBrowsingContextManager : public NotificationObserver { ~CPBrowsingContextManager(); // Generate a new unique CPBrowsingContext ID from the given - // URLRequestContext. Multiple CPBrowsingContexts can map to the same - // URLRequestContext. + // net::URLRequestContext. Multiple CPBrowsingContexts can map to the same + // net::URLRequestContext. CPBrowsingContext Allocate(net::URLRequestContext* context); - // Return the URLRequestContext that this CPBrowsingContext refers to, or NULL - // if not found. + // Return the net::URLRequestContext that this CPBrowsingContext refers to, or + // NULL if not found. net::URLRequestContext* ToURLRequestContext(CPBrowsingContext id); // Return a CPBrowsingContext ID that corresponds to the given - // URLRequestContext. This function differs from Allocate in that calling + // net::URLRequestContext. This function differs from Allocate in that calling // this multiple times with the same argument gives the same ID. CPBrowsingContext Lookup(net::URLRequestContext* context); @@ -57,8 +57,8 @@ class CPBrowsingContextManager : public NotificationObserver { NotificationRegistrar registrar_; - Map map_; // map of CPBrowsingContext -> URLRequestContext - ReverseMap reverse_map_; // map of URLRequestContext -> CPBrowsingContext + Map map_; // map of CPBrowsingContext -> net::URLRequestContext + ReverseMap reverse_map_; // map of net::URLRequestContext -> CPBrowsingContext }; #endif // CHROME_BROWSER_CHROME_PLUGIN_BROWSING_CONTEXT_H_ diff --git a/chrome/browser/chrome_plugin_host.cc b/chrome/browser/chrome_plugin_host.cc index ac8b41b..fc7b9ce 100644 --- a/chrome/browser/chrome_plugin_host.cc +++ b/chrome/browser/chrome_plugin_host.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. @@ -158,7 +158,7 @@ class PluginRequestHandler : public PluginHelper, : PluginHelper(plugin), cprequest_(cprequest), user_buffer_(NULL) { cprequest_->data = this; // see FromCPRequest(). - URLRequestContext* context = CPBrowsingContextManager::GetInstance()-> + net::URLRequestContext* context = CPBrowsingContextManager::GetInstance()-> ToURLRequestContext(cprequest_->context); // TODO(mpcomplete): remove fallback case when Gears support is prevalent. if (!context) @@ -388,7 +388,7 @@ void STDCALL CPB_SetKeepProcessAlive(CPID id, CPBool keep_alive) { CPError STDCALL CPB_GetCookies(CPID id, CPBrowsingContext bcontext, const char* url, char** cookies) { CHECK(ChromePluginLib::IsPluginThread()); - URLRequestContext* context = CPBrowsingContextManager::GetInstance()-> + net::URLRequestContext* context = CPBrowsingContextManager::GetInstance()-> ToURLRequestContext(bcontext); // TODO(mpcomplete): remove fallback case when Gears support is prevalent. if (!context) { diff --git a/chrome/browser/chrome_plugin_unittest.cc b/chrome/browser/chrome_plugin_unittest.cc index 93dc18d..cd80ac7 100644 --- a/chrome/browser/chrome_plugin_unittest.cc +++ b/chrome/browser/chrome_plugin_unittest.cc @@ -28,7 +28,7 @@ const int kResponseBufferSize = 4096; class TestURLRequestContextGetter : public URLRequestContextGetter { public: - virtual URLRequestContext* GetURLRequestContext() { + virtual net::URLRequestContext* GetURLRequestContext() { if (!context_) context_ = new TestURLRequestContext(); return context_; @@ -39,7 +39,7 @@ class TestURLRequestContextGetter : public URLRequestContextGetter { private: ~TestURLRequestContextGetter() {} - scoped_refptr<URLRequestContext> context_; + scoped_refptr<net::URLRequestContext> context_; }; class ChromePluginTest : public testing::Test, diff --git a/chrome/browser/dom_ui/net_internals_ui.cc b/chrome/browser/dom_ui/net_internals_ui.cc index 07109ba..c2706bc 100644 --- a/chrome/browser/dom_ui/net_internals_ui.cc +++ b/chrome/browser/dom_ui/net_internals_ui.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. @@ -61,7 +61,7 @@ const int kNetLogEventDelayMilliseconds = 100; // Returns the HostCache for |context|'s primary HostResolver, or NULL if // there is none. -net::HostCache* GetHostResolverCache(URLRequestContext* context) { +net::HostCache* GetHostResolverCache(net::URLRequestContext* context) { net::HostResolverImpl* host_resolver_impl = context->host_resolver()->GetAsHostResolverImpl(); @@ -72,7 +72,7 @@ net::HostCache* GetHostResolverCache(URLRequestContext* context) { } // Returns the disk cache backend for |context| if there is one, or NULL. -disk_cache::Backend* GetDiskCacheBackend(URLRequestContext* context) { +disk_cache::Backend* GetDiskCacheBackend(net::URLRequestContext* context) { if (!context->http_transaction_factory()) return NULL; @@ -85,7 +85,8 @@ disk_cache::Backend* GetDiskCacheBackend(URLRequestContext* context) { // Returns the http network session for |context| if there is one. // Otherwise, returns NULL. -net::HttpNetworkSession* GetHttpNetworkSession(URLRequestContext* context) { +net::HttpNetworkSession* GetHttpNetworkSession( + net::URLRequestContext* context) { if (!context->http_transaction_factory()) return NULL; @@ -691,7 +692,7 @@ void NetInternalsMessageHandler::IOThreadImpl::OnRendererReady( void NetInternalsMessageHandler::IOThreadImpl::OnGetProxySettings( const ListValue* list) { - URLRequestContext* context = context_getter_->GetURLRequestContext(); + net::URLRequestContext* context = context_getter_->GetURLRequestContext(); net::ProxyService* proxy_service = context->proxy_service(); DictionaryValue* dict = new DictionaryValue(); @@ -705,7 +706,7 @@ void NetInternalsMessageHandler::IOThreadImpl::OnGetProxySettings( void NetInternalsMessageHandler::IOThreadImpl::OnReloadProxySettings( const ListValue* list) { - URLRequestContext* context = context_getter_->GetURLRequestContext(); + net::URLRequestContext* context = context_getter_->GetURLRequestContext(); context->proxy_service()->ForceReloadProxyConfig(); // Cause the renderer to be notified of the new values. @@ -714,7 +715,7 @@ void NetInternalsMessageHandler::IOThreadImpl::OnReloadProxySettings( void NetInternalsMessageHandler::IOThreadImpl::OnGetBadProxies( const ListValue* list) { - URLRequestContext* context = context_getter_->GetURLRequestContext(); + net::URLRequestContext* context = context_getter_->GetURLRequestContext(); const net::ProxyRetryInfoMap& bad_proxies_map = context->proxy_service()->proxy_retry_info(); @@ -739,7 +740,7 @@ void NetInternalsMessageHandler::IOThreadImpl::OnGetBadProxies( void NetInternalsMessageHandler::IOThreadImpl::OnClearBadProxies( const ListValue* list) { - URLRequestContext* context = context_getter_->GetURLRequestContext(); + net::URLRequestContext* context = context_getter_->GetURLRequestContext(); context->proxy_service()->ClearBadProxiesCache(); // Cause the renderer to be notified of the new values. @@ -748,7 +749,7 @@ void NetInternalsMessageHandler::IOThreadImpl::OnClearBadProxies( void NetInternalsMessageHandler::IOThreadImpl::OnGetHostResolverInfo( const ListValue* list) { - URLRequestContext* context = context_getter_->GetURLRequestContext(); + net::URLRequestContext* context = context_getter_->GetURLRequestContext(); net::HostResolverImpl* host_resolver_impl = context->host_resolver()->GetAsHostResolverImpl(); net::HostCache* cache = GetHostResolverCache(context); @@ -830,7 +831,7 @@ void NetInternalsMessageHandler::IOThreadImpl::OnClearHostResolverCache( void NetInternalsMessageHandler::IOThreadImpl::OnEnableIPv6( const ListValue* list) { - URLRequestContext* context = context_getter_->GetURLRequestContext(); + net::URLRequestContext* context = context_getter_->GetURLRequestContext(); net::HostResolverImpl* host_resolver_impl = context->host_resolver()->GetAsHostResolverImpl(); diff --git a/chrome/browser/download/download_util.cc b/chrome/browser/download/download_util.cc index a7f6118..5e3dbc4 100644 --- a/chrome/browser/download/download_util.cc +++ b/chrome/browser/download/download_util.cc @@ -689,7 +689,8 @@ void DownloadUrl( URLRequestContextGetter* request_context_getter) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); - URLRequestContext* context = request_context_getter->GetURLRequestContext(); + net::URLRequestContext* context = + request_context_getter->GetURLRequestContext(); context->set_referrer_charset(referrer_charset); rdh->BeginDownload(url, diff --git a/chrome/browser/download/save_file_manager.cc b/chrome/browser/download/save_file_manager.cc index b74be65..c18dd3f 100644 --- a/chrome/browser/download/save_file_manager.cc +++ b/chrome/browser/download/save_file_manager.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. @@ -354,7 +354,8 @@ void SaveFileManager::OnSaveURL( int render_view_id, URLRequestContextGetter* request_context_getter) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); - URLRequestContext* context = request_context_getter->GetURLRequestContext(); + net::URLRequestContext* context = + request_context_getter->GetURLRequestContext(); resource_dispatcher_host_->BeginSaveFile(url, referrer, render_process_host_id, diff --git a/chrome/browser/file_system/file_system_dispatcher_host.h b/chrome/browser/file_system/file_system_dispatcher_host.h index 865ef70..365c049 100644 --- a/chrome/browser/file_system/file_system_dispatcher_host.h +++ b/chrome/browser/file_system/file_system_dispatcher_host.h @@ -94,7 +94,7 @@ class FileSystemDispatcherHost : public BrowserMessageFilter { OperationsMap operations_; // This holds the URLRequestContextGetter until Init() can be called from the - // IO thread, which will extract the URLRequestContext from it. + // IO thread, which will extract the net::URLRequestContext from it. scoped_refptr<URLRequestContextGetter> request_context_getter_; scoped_refptr<net::URLRequestContext> request_context_; diff --git a/chrome/browser/io_thread.cc b/chrome/browser/io_thread.cc index 02801d2..83d229e 100644 --- a/chrome/browser/io_thread.cc +++ b/chrome/browser/io_thread.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. @@ -176,10 +176,10 @@ class LoggingNetworkChangeObserver DISALLOW_COPY_AND_ASSIGN(LoggingNetworkChangeObserver); }; -scoped_refptr<URLRequestContext> +scoped_refptr<net::URLRequestContext> ConstructProxyScriptFetcherContext(IOThread::Globals* globals, net::NetLog* net_log) { - scoped_refptr<URLRequestContext> context(new URLRequestContext); + scoped_refptr<net::URLRequestContext> context(new net::URLRequestContext); context->set_net_log(net_log); context->set_host_resolver(globals->host_resolver.get()); context->set_cert_verifier(globals->cert_verifier.get()); @@ -347,14 +347,14 @@ void IOThread::Init() { &globals_->network_delegate, net_log_)); - scoped_refptr<URLRequestContext> proxy_script_fetcher_context = + scoped_refptr<net::URLRequestContext> proxy_script_fetcher_context = ConstructProxyScriptFetcherContext(globals_, net_log_); globals_->proxy_script_fetcher_context = proxy_script_fetcher_context; } void IOThread::CleanUp() { // Step 1: Kill all things that might be holding onto - // net::URLRequest/URLRequestContexts. + // net::URLRequest/net::URLRequestContexts. #if defined(USE_NSS) net::ShutdownOCSP(); @@ -382,8 +382,8 @@ void IOThread::CleanUp() { getter->ReleaseURLRequestContext(); } - // Step 2: Release objects that the URLRequestContext could have been pointing - // to. + // Step 2: Release objects that the net::URLRequestContext could have been + // pointing to. // This must be reset before the ChromeNetLog is destroyed. network_change_observer_.reset(); diff --git a/chrome/browser/net/chrome_url_request_context.cc b/chrome/browser/net/chrome_url_request_context.cc index c5c7edb..2b4473f 100644 --- a/chrome/browser/net/chrome_url_request_context.cc +++ b/chrome/browser/net/chrome_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. @@ -93,7 +93,7 @@ net::ProxyConfigService* CreateProxyConfigService(Profile* profile) { // Create a proxy service according to the options on command line. net::ProxyService* CreateProxyService( net::NetLog* net_log, - URLRequestContext* context, + net::URLRequestContext* context, net::ProxyConfigService* proxy_config_service, const CommandLine& command_line) { CheckCurrentlyOnIOThread(); @@ -548,7 +548,7 @@ ChromeURLRequestContextGetter::~ChromeURLRequestContextGetter() { DCHECK(registrar_.IsEmpty()) << "Probably didn't call CleanupOnUIThread"; - // Either we already transformed the factory into a URLRequestContext, or + // Either we already transformed the factory into a net::URLRequestContext, or // we still have a pending factory. DCHECK((factory_.get() && !url_request_context_.get()) || (!factory_.get() && url_request_context_.get())); @@ -561,7 +561,7 @@ ChromeURLRequestContextGetter::~ChromeURLRequestContextGetter() { } // Lazily create a ChromeURLRequestContext using our factory. -URLRequestContext* ChromeURLRequestContextGetter::GetURLRequestContext() { +net::URLRequestContext* ChromeURLRequestContextGetter::GetURLRequestContext() { CheckCurrentlyOnIOThread(); if (!url_request_context_) { @@ -570,7 +570,8 @@ URLRequestContext* ChromeURLRequestContextGetter::GetURLRequestContext() { if (is_main()) { url_request_context_->set_is_main(true); #if defined(USE_NSS) - // TODO(ukai): find a better way to set the URLRequestContext for OCSP. + // TODO(ukai): find a better way to set the net::URLRequestContext for + // OCSP. net::SetURLRequestContextForOCSP(url_request_context_); #endif } @@ -786,10 +787,10 @@ ChromeURLRequestContext::~ChromeURLRequestContext() { #if defined(USE_NSS) if (is_main()) { - URLRequestContext* ocsp_context = net::GetURLRequestContextForOCSP(); + net::URLRequestContext* ocsp_context = net::GetURLRequestContextForOCSP(); if (ocsp_context) { DCHECK_EQ(this, ocsp_context); - // We are releasing the URLRequestContext used by OCSP handlers. + // We are releasing the net::URLRequestContext used by OCSP handlers. net::SetURLRequestContextForOCSP(NULL); } } @@ -797,7 +798,7 @@ ChromeURLRequestContext::~ChromeURLRequestContext() { NotificationService::current()->Notify( NotificationType::URL_REQUEST_CONTEXT_RELEASED, - Source<URLRequestContext>(this), + Source<net::URLRequestContext>(this), NotificationService::NoDetails()); delete ftp_transaction_factory_; @@ -805,7 +806,7 @@ ChromeURLRequestContext::~ChromeURLRequestContext() { // cookie_policy_'s lifetime is auto-managed by chrome_cookie_policy_. We // null this out here to avoid a dangling reference to chrome_cookie_policy_ - // when ~URLRequestContext runs. + // when ~net::URLRequestContext runs. cookie_policy_ = NULL; } diff --git a/chrome/browser/net/chrome_url_request_context.h b/chrome/browser/net/chrome_url_request_context.h index 7d0c66b..e6c4f02 100644 --- a/chrome/browser/net/chrome_url_request_context.h +++ b/chrome/browser/net/chrome_url_request_context.h @@ -41,8 +41,8 @@ class NetworkDelegate; class ChromeURLRequestContext; class ChromeURLRequestContextFactory; -// Subclass of URLRequestContext which can be used to store extra information -// for requests. +// Subclass of net::URLRequestContext which can be used to store extra +// information for requests. // // All methods of this class must be called from the IO thread, // including the constructor and destructor. @@ -203,8 +203,8 @@ class ChromeURLRequestContext : public net::URLRequestContext { }; // A URLRequestContextGetter subclass used by the browser. This returns a -// subclass of URLRequestContext which can be used to store extra information -// about requests. +// subclass of net::URLRequestContext which can be used to store extra +// information about requests. // // Most methods are expected to be called on the UI thread, except for // the destructor and GetURLRequestContext(). @@ -233,7 +233,7 @@ class ChromeURLRequestContextGetter : public URLRequestContextGetter, void ReleaseURLRequestContext(); // Convenience overload of GetURLRequestContext() that returns a - // ChromeURLRequestContext* rather than a URLRequestContext*. + // ChromeURLRequestContext* rather than a net::URLRequestContext*. ChromeURLRequestContext* GetIOContext() { return reinterpret_cast<ChromeURLRequestContext*>(GetURLRequestContext()); } @@ -246,7 +246,7 @@ class ChromeURLRequestContextGetter : public URLRequestContextGetter, // Create an instance for an original profile for media. This is expected to // get called on UI thread. This method takes a profile and reuses the - // 'original' URLRequestContext for common files. + // 'original' net::URLRequestContext for common files. static ChromeURLRequestContextGetter* CreateOriginalForMedia( Profile* profile, const FilePath& disk_cache_path, int cache_size); @@ -308,7 +308,7 @@ class ChromeURLRequestContextGetter : public URLRequestContextGetter, // Access only from the IO thread. scoped_ptr<ChromeURLRequestContextFactory> factory_; - // NULL if not yet initialized. Otherwise, it is the URLRequestContext + // NULL if not yet initialized. Otherwise, it is the net::URLRequestContext // instance that was lazilly created by GetURLRequestContext. // Access only from the IO thread. scoped_refptr<net::URLRequestContext> url_request_context_; diff --git a/chrome/browser/net/connection_tester.cc b/chrome/browser/net/connection_tester.cc index f23d619..d68a169 100644 --- a/chrome/browser/net/connection_tester.cc +++ b/chrome/browser/net/connection_tester.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. @@ -38,9 +38,10 @@ namespace { // An instance of ExperimentURLRequestContext is created for each experiment // run by ConnectionTester. The class initializes network dependencies according // to the specified "experiment". -class ExperimentURLRequestContext : public URLRequestContext { +class ExperimentURLRequestContext : public net::URLRequestContext { public: - explicit ExperimentURLRequestContext(URLRequestContext* proxy_request_context) + explicit ExperimentURLRequestContext( + net::URLRequestContext* proxy_request_context) : proxy_request_context_(proxy_request_context) {} int Init(const ConnectionTester::Experiment& experiment) { @@ -223,7 +224,7 @@ class ExperimentURLRequestContext : public URLRequestContext { return net::ERR_FAILED; } - const scoped_refptr<URLRequestContext> proxy_request_context_; + const scoped_refptr<net::URLRequestContext> proxy_request_context_; }; } // namespace @@ -309,7 +310,7 @@ void ConnectionTester::TestRunner::OnResponseCompleted( } void ConnectionTester::TestRunner::Run(const Experiment& experiment) { - // Try to create a URLRequestContext for this experiment. + // Try to create a net::URLRequestContext for this experiment. scoped_refptr<ExperimentURLRequestContext> context( new ExperimentURLRequestContext(tester_->proxy_request_context_)); int rv = context->Init(experiment); @@ -327,8 +328,9 @@ void ConnectionTester::TestRunner::Run(const Experiment& experiment) { // ConnectionTester ---------------------------------------------------------- -ConnectionTester::ConnectionTester(Delegate* delegate, - URLRequestContext* proxy_request_context) +ConnectionTester::ConnectionTester( + Delegate* delegate, + net::URLRequestContext* proxy_request_context) : delegate_(delegate), proxy_request_context_(proxy_request_context) { DCHECK(delegate); DCHECK(proxy_request_context); diff --git a/chrome/browser/net/connection_tester_unittest.cc b/chrome/browser/net/connection_tester_unittest.cc index 6735599..8eecd81 100644 --- a/chrome/browser/net/connection_tester_unittest.cc +++ b/chrome/browser/net/connection_tester_unittest.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. @@ -88,7 +88,7 @@ class ConnectionTesterTest : public PlatformTest { : test_server_(net::TestServer::TYPE_HTTP, FilePath(FILE_PATH_LITERAL("net/data/url_request_unittest"))), client_socket_factory_(net::ClientSocketFactory::GetDefaultFactory()), - proxy_script_fetcher_context_(new URLRequestContext), + proxy_script_fetcher_context_(new net::URLRequestContext), message_loop_(MessageLoop::TYPE_IO), io_thread_(BrowserThread::IO, &message_loop_) { InitializeRequestContext(); @@ -105,7 +105,7 @@ class ConnectionTesterTest : public PlatformTest { scoped_refptr<net::SSLConfigService> ssl_config_service_; scoped_ptr<net::HttpTransactionFactory> http_transaction_factory_; net::HttpAuthHandlerRegistryFactory http_auth_handler_factory_; - scoped_refptr<URLRequestContext> proxy_script_fetcher_context_; + scoped_refptr<net::URLRequestContext> proxy_script_fetcher_context_; private: void InitializeRequestContext() { diff --git a/chrome/browser/net/preconnect.cc b/chrome/browser/net/preconnect.cc index 972e302..c35bc0e 100644 --- a/chrome/browser/net/preconnect.cc +++ b/chrome/browser/net/preconnect.cc @@ -56,7 +56,7 @@ void Preconnect::Connect(const GURL& url, int count) { UMA_HISTOGRAM_ENUMERATION("Net.PreconnectMotivation", motivation_, UrlInfo::MAX_MOTIVATED); - URLRequestContext* context = getter->GetURLRequestContext(); + net::URLRequestContext* context = getter->GetURLRequestContext(); net::HttpTransactionFactory* factory = context->http_transaction_factory(); net::HttpNetworkSession* session = factory->GetSession(); diff --git a/chrome/browser/plugin_process_host.cc b/chrome/browser/plugin_process_host.cc index 7bbb5a7..6ab2aae 100644 --- a/chrome/browser/plugin_process_host.cc +++ b/chrome/browser/plugin_process_host.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. @@ -59,14 +59,14 @@ static const char kDefaultPluginFinderURL[] = namespace { // Helper class that we pass to ResourceMessageFilter so that it can find the -// right URLRequestContext for a request. +// right net::URLRequestContext for a request. class PluginURLRequestContextOverride : public ResourceMessageFilter::URLRequestContextOverride { public: PluginURLRequestContextOverride() { } - virtual URLRequestContext* GetRequestContext( + virtual net::URLRequestContext* GetRequestContext( uint32 request_id, ResourceType::Type resource_type) { return CPBrowsingContextManager::GetInstance()->ToURLRequestContext( request_id); @@ -380,7 +380,7 @@ void PluginProcessHost::OpenChannelToPlugin(Client* client) { void PluginProcessHost::OnGetCookies(uint32 request_context, const GURL& url, std::string* cookies) { - URLRequestContext* context = CPBrowsingContextManager::GetInstance()-> + net::URLRequestContext* context = CPBrowsingContextManager::GetInstance()-> ToURLRequestContext(request_context); // TODO(mpcomplete): remove fallback case when Gears support is prevalent. if (!context) diff --git a/chrome/browser/policy/device_management_service.cc b/chrome/browser/policy/device_management_service.cc index f069d03..e29d21a 100644 --- a/chrome/browser/policy/device_management_service.cc +++ b/chrome/browser/policy/device_management_service.cc @@ -27,18 +27,18 @@ namespace { // Custom request context implementation that allows to override the user agent, // amongst others. Wraps a baseline request context from which we reuse the // networking components. -class DeviceManagementRequestContext : public URLRequestContext { +class DeviceManagementRequestContext : public net::URLRequestContext { public: - explicit DeviceManagementRequestContext(URLRequestContext* base_context); + explicit DeviceManagementRequestContext(net::URLRequestContext* base_context); virtual ~DeviceManagementRequestContext(); private: - // Overriden from URLRequestContext. + // Overridden from net::URLRequestContext: virtual const std::string& GetUserAgent(const GURL& url) const; }; DeviceManagementRequestContext::DeviceManagementRequestContext( - URLRequestContext* base_context) { + net::URLRequestContext* base_context) { // Share resolver, proxy service and ssl bits with the baseline context. This // is important so we don't make redundant requests (e.g. when resolving proxy // auto configuration). @@ -76,17 +76,17 @@ class DeviceManagementRequestContextGetter : public URLRequestContextGetter { URLRequestContextGetter* base_context_getter) : base_context_getter_(base_context_getter) {} - // URLRequestContextGetter overrides. - virtual URLRequestContext* GetURLRequestContext(); + // Overridden from URLRequestContextGetter: + virtual net::URLRequestContext* GetURLRequestContext(); virtual scoped_refptr<base::MessageLoopProxy> GetIOMessageLoopProxy() const; private: - scoped_refptr<URLRequestContext> context_; + scoped_refptr<net::URLRequestContext> context_; scoped_refptr<URLRequestContextGetter> base_context_getter_; }; -URLRequestContext* +net::URLRequestContext* DeviceManagementRequestContextGetter::GetURLRequestContext() { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); if (!context_) { diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc index 8323989..925933a 100644 --- a/chrome/browser/profiles/profile_impl.cc +++ b/chrome/browser/profiles/profile_impl.cc @@ -716,7 +716,7 @@ URLRequestContextGetter* ProfileImpl::GetRequestContext() { default_request_context_ = request_context_; request_context_->set_is_main(true); // TODO(eroman): this isn't terribly useful anymore now that the - // URLRequestContext is constructed by the IO thread... + // net::URLRequestContext is constructed by the IO thread... NotificationService::current()->Notify( NotificationType::DEFAULT_REQUEST_CONTEXT_AVAILABLE, NotificationService::AllSources(), NotificationService::NoDetails()); diff --git a/chrome/browser/renderer_host/browser_render_process_host.cc b/chrome/browser/renderer_host/browser_render_process_host.cc index 3750dd3..82caa11 100644 --- a/chrome/browser/renderer_host/browser_render_process_host.cc +++ b/chrome/browser/renderer_host/browser_render_process_host.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. @@ -229,7 +229,7 @@ class VisitedLinkUpdater { namespace { // Helper class that we pass to ResourceMessageFilter so that it can find the -// right URLRequestContext for a request. +// right net::URLRequestContext for a request. class RendererURLRequestContextOverride : public ResourceMessageFilter::URLRequestContextOverride { public: @@ -238,7 +238,7 @@ class RendererURLRequestContextOverride media_request_context_(profile->GetRequestContextForMedia()) { } - virtual URLRequestContext* GetRequestContext( + virtual net::URLRequestContext* GetRequestContext( uint32 request_id, ResourceType::Type resource_type) { URLRequestContextGetter* request_context = request_context_; // If the request has resource type of ResourceType::MEDIA, we use a request diff --git a/chrome/browser/renderer_host/pepper_message_filter.cc b/chrome/browser/renderer_host/pepper_message_filter.cc index 62464af..9608297 100644 --- a/chrome/browser/renderer_host/pepper_message_filter.cc +++ b/chrome/browser/renderer_host/pepper_message_filter.cc @@ -171,7 +171,7 @@ void PepperMessageFilter::OnPepperConnectTcp( uint16 port) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); - URLRequestContext* req_context = + net::URLRequestContext* req_context = profile_->GetRequestContext()->GetURLRequestContext(); net::HostResolver::RequestInfo request_info(net::HostPortPair(host, port)); diff --git a/chrome/browser/renderer_host/render_message_filter.cc b/chrome/browser/renderer_host/render_message_filter.cc index d00235c..5c28224 100644 --- a/chrome/browser/renderer_host/render_message_filter.cc +++ b/chrome/browser/renderer_host/render_message_filter.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. @@ -561,7 +561,7 @@ void RenderMessageFilter::OnGetRawCookies( void RenderMessageFilter::OnDeleteCookie(const GURL& url, const std::string& cookie_name) { - URLRequestContext* context = GetRequestContextForURL(url); + net::URLRequestContext* context = GetRequestContextForURL(url); context->cookie_store()->DeleteCookie(url, cookie_name); } @@ -569,7 +569,7 @@ void RenderMessageFilter::OnCookiesEnabled( const GURL& url, const GURL& first_party_for_cookies, IPC::Message* reply_msg) { - URLRequestContext* context = GetRequestContextForURL(url); + net::URLRequestContext* context = GetRequestContextForURL(url); CookiesEnabledCompletion* callback = new CookiesEnabledCompletion(reply_msg, this); int policy = net::OK; @@ -737,7 +737,7 @@ void RenderMessageFilter::OnGenerateRoutingID(int* route_id) { void RenderMessageFilter::OnDownloadUrl(const IPC::Message& message, const GURL& url, const GURL& referrer) { - URLRequestContext* context = request_context_->GetURLRequestContext(); + net::URLRequestContext* context = request_context_->GetURLRequestContext(); // Don't show "Save As" UI. bool prompt_for_save_location = false; diff --git a/chrome/browser/renderer_host/render_message_filter.h b/chrome/browser/renderer_host/render_message_filter.h index 6274a9f..4b2b5ed 100644 --- a/chrome/browser/renderer_host/render_message_filter.h +++ b/chrome/browser/renderer_host/render_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. @@ -84,8 +84,8 @@ class RenderMessageFilter : public BrowserMessageFilter, } bool off_the_record() { return off_the_record_; } - // Returns either the extension URLRequestContext or regular URLRequestContext - // depending on whether |url| is an extension URL. + // Returns either the extension net::URLRequestContext or regular + // net::URLRequestContext depending on whether |url| is an extension URL. // Only call on the IO thread. ChromeURLRequestContext* GetRequestContextForURL(const GURL& url); diff --git a/chrome/browser/renderer_host/resource_dispatcher_host.cc b/chrome/browser/renderer_host/resource_dispatcher_host.cc index dc3427a..ef9ec9c 100644 --- a/chrome/browser/renderer_host/resource_dispatcher_host.cc +++ b/chrome/browser/renderer_host/resource_dispatcher_host.cc @@ -203,7 +203,7 @@ std::vector<int> GetAllNetErrorCodes() { // Temporary experiment to help track down http://crbug.com/68766. // This should crash if called with an invalid ChromeURLRequestContext. // TODO(eroman): Delete this when experiment is complete. -void CheckContextForBug68766(URLRequestContext* context) { +void CheckContextForBug68766(net::URLRequestContext* context) { if (context) static_cast<ChromeURLRequestContext*>(context)->IsExternal(); } @@ -692,7 +692,7 @@ void ResourceDispatcherHost::BeginDownload( bool prompt_for_save_location, int child_id, int route_id, - URLRequestContext* request_context) { + net::URLRequestContext* request_context) { if (is_shutdown_) return; @@ -749,11 +749,12 @@ void ResourceDispatcherHost::BeginDownload( } // This function is only used for saving feature. -void ResourceDispatcherHost::BeginSaveFile(const GURL& url, - const GURL& referrer, - int child_id, - int route_id, - URLRequestContext* request_context) { +void ResourceDispatcherHost::BeginSaveFile( + const GURL& url, + const GURL& referrer, + int child_id, + int route_id, + net::URLRequestContext* request_context) { if (is_shutdown_) return; diff --git a/chrome/browser/renderer_host/resource_message_filter.cc b/chrome/browser/renderer_host/resource_message_filter.cc index b8005f3..cf6ff6b 100644 --- a/chrome/browser/renderer_host/resource_message_filter.cc +++ b/chrome/browser/renderer_host/resource_message_filter.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. @@ -9,7 +9,6 @@ #include "chrome/browser/renderer_host/resource_dispatcher_host.h" #include "chrome/common/render_messages.h" - ResourceMessageFilter::ResourceMessageFilter( int child_id, ChildProcessInfo::ProcessType process_type, @@ -38,7 +37,7 @@ bool ResourceMessageFilter::OnMessageReceived(const IPC::Message& message, ChromeURLRequestContext* ResourceMessageFilter::GetURLRequestContext( uint32 request_id, ResourceType::Type resource_type) { - URLRequestContext* rv = NULL; + net::URLRequestContext* rv = NULL; if (url_request_context_override_.get()) { rv = url_request_context_override_->GetRequestContext( request_id, resource_type); diff --git a/chrome/browser/renderer_host/resource_message_filter.h b/chrome/browser/renderer_host/resource_message_filter.h index 471c60a..bfc0ca6 100644 --- a/chrome/browser/renderer_host/resource_message_filter.h +++ b/chrome/browser/renderer_host/resource_message_filter.h @@ -24,7 +24,7 @@ class URLRequestContext; // will not interfere with browser UI. class ResourceMessageFilter : public BrowserMessageFilter { public: - // Allows overriding the URLRequestContext used to service requests. + // Allows overriding the net::URLRequestContext used to service requests. class URLRequestContextOverride : public base::RefCountedThreadSafe<URLRequestContextOverride> { public: @@ -49,7 +49,7 @@ class ResourceMessageFilter : public BrowserMessageFilter { virtual bool OnMessageReceived(const IPC::Message& message, bool* message_was_ok); - // Returns the URLRequestContext for the given request. + // Returns the net::URLRequestContext for the given request. ChromeURLRequestContext* GetURLRequestContext( uint32 request_id, ResourceType::Type resource_type); diff --git a/chrome/browser/renderer_host/socket_stream_dispatcher_host.cc b/chrome/browser/renderer_host/socket_stream_dispatcher_host.cc index fc642e8..65fda50 100644 --- a/chrome/browser/renderer_host/socket_stream_dispatcher_host.cc +++ b/chrome/browser/renderer_host/socket_stream_dispatcher_host.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. @@ -146,8 +146,8 @@ void SocketStreamDispatcherHost::DeleteSocketStreamHost(int socket_id) { } } -URLRequestContext* SocketStreamDispatcherHost::GetURLRequestContext() { - URLRequestContext* rv = NULL; +net::URLRequestContext* SocketStreamDispatcherHost::GetURLRequestContext() { + net::URLRequestContext* rv = NULL; if (url_request_context_override_.get()) { rv = url_request_context_override_->GetRequestContext( 0, ResourceType::SUB_RESOURCE); diff --git a/chrome/browser/renderer_host/socket_stream_dispatcher_host.h b/chrome/browser/renderer_host/socket_stream_dispatcher_host.h index 5c1b47ce..23d18e0 100644 --- a/chrome/browser/renderer_host/socket_stream_dispatcher_host.h +++ b/chrome/browser/renderer_host/socket_stream_dispatcher_host.h @@ -53,7 +53,6 @@ class SocketStreamDispatcherHost : public BrowserMessageFilter, void DeleteSocketStreamHost(int socket_id); - // Returns the URLRequestContext. net::URLRequestContext* GetURLRequestContext(); IDMap<SocketStreamHost> hosts_; diff --git a/chrome/browser/renderer_host/socket_stream_host.cc b/chrome/browser/renderer_host/socket_stream_host.cc index 6c66f79..a38975f 100644 --- a/chrome/browser/renderer_host/socket_stream_host.cc +++ b/chrome/browser/renderer_host/socket_stream_host.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. @@ -45,7 +45,7 @@ SocketStreamHost::~SocketStreamHost() { } void SocketStreamHost::Connect(const GURL& url, - URLRequestContext* request_context) { + net::URLRequestContext* request_context) { VLOG(1) << "SocketStreamHost::Connect url=" << url; socket_ = net::SocketStreamJob::CreateSocketStreamJob(url, delegate_); socket_->set_context(request_context); diff --git a/chrome/browser/speech/speech_recognition_request.cc b/chrome/browser/speech/speech_recognition_request.cc index 402af7e..1281666 100644 --- a/chrome/browser/speech/speech_recognition_request.cc +++ b/chrome/browser/speech/speech_recognition_request.cc @@ -134,7 +134,8 @@ bool SpeechRecognitionRequest::Send(const std::string& language, // If no language is provided then we use the first from the accepted // language list. If this list is empty then it defaults to "en-US". // Example of the contents of this list: "es,en-GB;q=0.8", "" - URLRequestContext* request_context = url_context_->GetURLRequestContext(); + net::URLRequestContext* request_context = + url_context_->GetURLRequestContext(); DCHECK(request_context); std::string accepted_language_list = request_context->accept_language(); size_t separator = accepted_language_list.find_first_of(",;"); diff --git a/chrome/browser/sync/glue/http_bridge.cc b/chrome/browser/sync/glue/http_bridge.cc index 4693153..265a044 100644 --- a/chrome/browser/sync/glue/http_bridge.cc +++ b/chrome/browser/sync/glue/http_bridge.cc @@ -26,10 +26,11 @@ HttpBridge::RequestContextGetter::RequestContextGetter( : baseline_context_getter_(baseline_context_getter) { } -URLRequestContext* HttpBridge::RequestContextGetter::GetURLRequestContext() { +net::URLRequestContext* +HttpBridge::RequestContextGetter::GetURLRequestContext() { // Lazily create the context. if (!context_) { - URLRequestContext* baseline_context = + net::URLRequestContext* baseline_context = baseline_context_getter_->GetURLRequestContext(); context_ = new RequestContext(baseline_context); baseline_context_getter_ = NULL; @@ -67,7 +68,8 @@ void HttpBridgeFactory::Destroy(sync_api::HttpPostProviderInterface* http) { static_cast<HttpBridge*>(http)->Release(); } -HttpBridge::RequestContext::RequestContext(URLRequestContext* baseline_context) +HttpBridge::RequestContext::RequestContext( + net::URLRequestContext* baseline_context) : baseline_context_(baseline_context) { // Create empty, in-memory cookie store. diff --git a/chrome/browser/sync/glue/http_bridge.h b/chrome/browser/sync/glue/http_bridge.h index 5fb2419..57c9f94 100644 --- a/chrome/browser/sync/glue/http_bridge.h +++ b/chrome/browser/sync/glue/http_bridge.h @@ -45,7 +45,7 @@ class HttpBridge : public base::RefCountedThreadSafe<HttpBridge>, 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 + // Typically |baseline_context| should be the net::URLRequestContext of the // currently active profile. explicit RequestContext(net::URLRequestContext* baseline_context); @@ -86,7 +86,7 @@ class HttpBridge : public base::RefCountedThreadSafe<HttpBridge>, private: ~RequestContextGetter() {} - // User agent to apply to the URLRequestContext. + // User agent to apply to the net::URLRequestContext. std::string user_agent_; scoped_refptr<URLRequestContextGetter> baseline_context_getter_; @@ -146,7 +146,7 @@ class HttpBridge : public base::RefCountedThreadSafe<HttpBridge>, // still have a function to statically pass to PostTask. void CallMakeAsynchronousPost() { MakeAsynchronousPost(); } - // Gets a customized URLRequestContext for bridged requests. See + // Gets a customized net::URLRequestContext for bridged requests. See // RequestContext definition for details. scoped_refptr<RequestContextGetter> context_getter_for_request_; diff --git a/chrome/browser/sync/glue/http_bridge_unittest.cc b/chrome/browser/sync/glue/http_bridge_unittest.cc index 7b60be4..600e570 100644 --- a/chrome/browser/sync/glue/http_bridge_unittest.cc +++ b/chrome/browser/sync/glue/http_bridge_unittest.cc @@ -21,7 +21,7 @@ const FilePath::CharType kDocRoot[] = FILE_PATH_LITERAL("chrome/test/data"); // Lazy getter for TestURLRequestContext instances. class TestURLRequestContextGetter : public URLRequestContextGetter { public: - virtual URLRequestContext* GetURLRequestContext() { + virtual net::URLRequestContext* GetURLRequestContext() { if (!context_) context_ = new TestURLRequestContext; return context_; @@ -33,7 +33,7 @@ class TestURLRequestContextGetter : public URLRequestContextGetter { private: ~TestURLRequestContextGetter() {} - scoped_refptr<URLRequestContext> context_; + scoped_refptr<net::URLRequestContext> context_; }; class HttpBridgeTest : public testing::Test { diff --git a/chrome/browser/ui/cocoa/browser_test_helper.h b/chrome/browser/ui/cocoa/browser_test_helper.h index 44cde96..af22364 100644 --- a/chrome/browser/ui/cocoa/browser_test_helper.h +++ b/chrome/browser/ui/cocoa/browser_test_helper.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,8 +15,8 @@ // // This class creates fake UI, file, and IO threads because many objects that // are attached to the TestingProfile (and other objects) have traits that limit -// their destruction to certain threads. For example, the URLRequestContext can -// only be deleted on the IO thread; without this fake IO thread, the object +// their destruction to certain threads. For example, the net::URLRequestContext +// can only be deleted on the IO thread; without this fake IO thread, the object // would never be deleted and would report as a leak under Valgrind. Note that // these are fake threads and they all share the same MessageLoop. // diff --git a/chrome/browser/worker_host/worker_process_host.cc b/chrome/browser/worker_host/worker_process_host.cc index 2006e2f..af13f2e 100644 --- a/chrome/browser/worker_host/worker_process_host.cc +++ b/chrome/browser/worker_host/worker_process_host.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. @@ -44,23 +44,23 @@ namespace { // Helper class that we pass to SocketStreamDispatcherHost so that it can find -// the right URLRequestContext for a request. +// the right net::URLRequestContext for a request. class URLRequestContextOverride : public ResourceMessageFilter::URLRequestContextOverride { public: explicit URLRequestContextOverride( - URLRequestContext* url_request_context) + net::URLRequestContext* url_request_context) : url_request_context_(url_request_context) { } virtual ~URLRequestContextOverride() {} - virtual URLRequestContext* GetRequestContext( + virtual net::URLRequestContext* GetRequestContext( uint32 request_id, ResourceType::Type resource_type) { return url_request_context_; } private: - URLRequestContext* url_request_context_; + net::URLRequestContext* url_request_context_; }; } // namespace diff --git a/chrome/browser/worker_host/worker_process_host.h b/chrome/browser/worker_host/worker_process_host.h index f3f6fdd..36979c3 100644 --- a/chrome/browser/worker_host/worker_process_host.h +++ b/chrome/browser/worker_host/worker_process_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. @@ -20,8 +20,8 @@ class URLRequestContextGetter; // The WorkerProcessHost is the interface that represents the browser side of // the browser <-> worker communication channel. There will be one // WorkerProcessHost per worker process. Currently each worker runs in its own -// process, but that may change. However, we do assume [by storing a -// URLRequestContext] that a WorkerProcessHost serves a single Profile. +// process, but that may change. However, we do assume (by storing a +// net::URLRequestContext) that a WorkerProcessHost serves a single Profile. class WorkerProcessHost : public BrowserChildProcessHost { public: |