summaryrefslogtreecommitdiffstats
path: root/chrome/browser/net
diff options
context:
space:
mode:
authortfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-15 00:21:34 +0000
committertfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-15 00:21:34 +0000
commitaeb53f0e2f6352ec7fbc2113270a97072b42c764 (patch)
tree1f4da7884df919c21903a7881964273a9f7496fd /chrome/browser/net
parentec8962ca7de01eb5685b32a4361dd7be8f7e6293 (diff)
downloadchromium_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/net')
-rw-r--r--chrome/browser/net/chrome_url_request_context.cc19
-rw-r--r--chrome/browser/net/chrome_url_request_context.h14
-rw-r--r--chrome/browser/net/connection_tester.cc16
-rw-r--r--chrome/browser/net/connection_tester_unittest.cc6
-rw-r--r--chrome/browser/net/preconnect.cc2
5 files changed, 30 insertions, 27 deletions
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();