diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/ocsp/nss_ocsp.cc | 9 | ||||
-rw-r--r-- | net/ocsp/nss_ocsp.h | 1 | ||||
-rw-r--r-- | net/url_request/url_request_context.cc | 4 | ||||
-rw-r--r-- | net/url_request/url_request_context.h | 8 | ||||
-rw-r--r-- | net/url_request/url_request_context_getter.cc | 2 | ||||
-rw-r--r-- | net/url_request/url_request_context_getter.h | 14 |
6 files changed, 2 insertions, 36 deletions
diff --git a/net/ocsp/nss_ocsp.cc b/net/ocsp/nss_ocsp.cc index f353778..80e5413 100644 --- a/net/ocsp/nss_ocsp.cc +++ b/net/ocsp/nss_ocsp.cc @@ -931,19 +931,10 @@ void ShutdownOCSP() { void SetURLRequestContextForOCSP(URLRequestContext* request_context) { pthread_mutex_lock(&g_request_context_lock); if (request_context) { - DCHECK(request_context->is_main()); DCHECK(!g_request_context); } g_request_context = request_context; pthread_mutex_unlock(&g_request_context_lock); } -URLRequestContext* GetURLRequestContextForOCSP() { - pthread_mutex_lock(&g_request_context_lock); - URLRequestContext* request_context = g_request_context; - pthread_mutex_unlock(&g_request_context_lock); - DCHECK(!request_context || request_context->is_main()); - return request_context; -} - } // namespace net diff --git a/net/ocsp/nss_ocsp.h b/net/ocsp/nss_ocsp.h index fae7a87..f88201d 100644 --- a/net/ocsp/nss_ocsp.h +++ b/net/ocsp/nss_ocsp.h @@ -26,7 +26,6 @@ void ShutdownOCSP(); // Set URLRequestContext for OCSP handlers. void SetURLRequestContextForOCSP(URLRequestContext* request_context); -URLRequestContext* GetURLRequestContextForOCSP(); } // namespace net diff --git a/net/url_request/url_request_context.cc b/net/url_request/url_request_context.cc index c9c232d..f34e196 100644 --- a/net/url_request/url_request_context.cc +++ b/net/url_request/url_request_context.cc @@ -13,8 +13,7 @@ namespace net { URLRequestContext::URLRequestContext() - : is_main_(false), - net_log_(NULL), + : net_log_(NULL), host_resolver_(NULL), cert_verifier_(NULL), dnsrr_resolver_(NULL), @@ -30,7 +29,6 @@ URLRequestContext::URLRequestContext() void URLRequestContext::CopyFrom(URLRequestContext* other) { // Copy URLRequestContext parameters. - // Do not copy is_main_. set_net_log(other->net_log()); set_host_resolver(other->host_resolver()); set_cert_verifier(other->cert_verifier()); diff --git a/net/url_request/url_request_context.h b/net/url_request/url_request_context.h index 8749573..3ba4841 100644 --- a/net/url_request/url_request_context.h +++ b/net/url_request/url_request_context.h @@ -168,11 +168,6 @@ class URLRequestContext referrer_charset_ = charset; } - // Controls whether or not the URLRequestContext considers itself to be the - // "main" URLRequestContext. - bool is_main() const { return is_main_; } - void set_is_main(bool is_main) { is_main_ = is_main; } - const URLRequestJobFactory* job_factory() const { return job_factory_; } void set_job_factory(const URLRequestJobFactory* job_factory) { job_factory_ = job_factory; @@ -189,9 +184,6 @@ class URLRequestContext // be added to CopyFrom. // --------------------------------------------------------------------------- - // Indicates whether or not this is the main URLRequestContext. - bool is_main_; - // Ownership for these members are not defined here. Clients should either // provide storage elsewhere or have a subclass take ownership. NetLog* net_log_; diff --git a/net/url_request/url_request_context_getter.cc b/net/url_request/url_request_context_getter.cc index 2313c23..8d21bce 100644 --- a/net/url_request/url_request_context_getter.cc +++ b/net/url_request/url_request_context_getter.cc @@ -12,7 +12,7 @@ CookieStore* URLRequestContextGetter::DONTUSEME_GetCookieStore() { return NULL; } -URLRequestContextGetter::URLRequestContextGetter() : is_main_(false) {} +URLRequestContextGetter::URLRequestContextGetter() {} URLRequestContextGetter::~URLRequestContextGetter() {} diff --git a/net/url_request/url_request_context_getter.h b/net/url_request/url_request_context_getter.h index b6c5464..f5176cb3 100644 --- a/net/url_request/url_request_context_getter.h +++ b/net/url_request/url_request_context_getter.h @@ -36,14 +36,6 @@ class URLRequestContextGetter virtual scoped_refptr<base::MessageLoopProxy> GetIOMessageLoopProxy() const = 0; - // Controls whether or not the URLRequestContextGetter considers itself to be - // the the "main" URLRequestContextGetter. Note that each Profile will have a - // "default" URLRequestContextGetter. Therefore, "is_main" refers to the - // default URLRequestContextGetter for the "main" Profile. - // TODO(willchan): Move this code to ChromeURLRequestContextGetter, since this - // ia a browser process specific concept. - void set_is_main(bool is_main) { is_main_ = is_main; } - protected: friend class DeleteTask<const URLRequestContextGetter>; friend struct URLRequestContextGetterTraits; @@ -51,16 +43,10 @@ class URLRequestContextGetter URLRequestContextGetter(); virtual ~URLRequestContextGetter(); - bool is_main() const { return is_main_; } - private: // OnDestruct is meant to ensure deletion on the thread on which the request // IO happens. void OnDestruct() const; - - // Indicates whether or not this is the default URLRequestContextGetter for - // the main Profile. - bool is_main_; }; struct URLRequestContextGetterTraits { |