summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/browser_main.cc2
-rw-r--r--chrome/browser/io_thread.cc9
-rw-r--r--chrome/browser/net/chrome_url_request_context.cc16
-rw-r--r--chrome/browser/net/chrome_url_request_context.h1
-rw-r--r--chrome/browser/profile_impl.cc1
-rw-r--r--chrome/common/net/url_request_context_getter.h18
6 files changed, 9 insertions, 38 deletions
diff --git a/chrome/browser/browser_main.cc b/chrome/browser/browser_main.cc
index d66a2a4..3712a06 100644
--- a/chrome/browser/browser_main.cc
+++ b/chrome/browser/browser_main.cc
@@ -50,8 +50,8 @@
#include "chrome/browser/metrics/metrics_log.h"
#include "chrome/browser/metrics/metrics_service.h"
#include "chrome/browser/net/blob_url_request_job_factory.h"
-#include "chrome/browser/net/metadata_url_request.h"
#include "chrome/browser/net/predictor_api.h"
+#include "chrome/browser/net/metadata_url_request.h"
#include "chrome/browser/net/sdch_dictionary_fetcher.h"
#include "chrome/browser/net/websocket_experiment/websocket_experiment_runner.h"
#include "chrome/browser/plugin_service.h"
diff --git a/chrome/browser/io_thread.cc b/chrome/browser/io_thread.cc
index 1df6dcf..42a8a17 100644
--- a/chrome/browser/io_thread.cc
+++ b/chrome/browser/io_thread.cc
@@ -25,9 +25,6 @@
#include "net/base/net_util.h"
#include "net/http/http_auth_filter.h"
#include "net/http/http_auth_handler_factory.h"
-#if defined(USE_NSS)
-#include "net/ocsp/nss_ocsp.h"
-#endif // defined(USE_NSS)
namespace {
@@ -161,12 +158,6 @@ void IOThread::ChangedToOnTheRecord() {
void IOThread::Init() {
BrowserProcessSubThread::Init();
- DCHECK_EQ(MessageLoop::TYPE_IO, message_loop()->type());
-
-#if defined(USE_NSS)
- net::SetMessageLoopForOCSP();
-#endif // defined(USE_NSS)
-
DCHECK(!globals_);
globals_ = new Globals;
diff --git a/chrome/browser/net/chrome_url_request_context.cc b/chrome/browser/net/chrome_url_request_context.cc
index 1322f99..7cc4a91 100644
--- a/chrome/browser/net/chrome_url_request_context.cc
+++ b/chrome/browser/net/chrome_url_request_context.cc
@@ -313,6 +313,11 @@ ChromeURLRequestContext* FactoryForOriginal::Create() {
appcache_service_->set_request_context(context);
+#if defined(USE_NSS)
+ // TODO(ukai): find a better way to set the URLRequestContext for OCSP.
+ net::SetURLRequestContextForOCSP(context);
+#endif
+
context->set_net_log(io_thread_globals->net_log.get());
return context;
}
@@ -552,14 +557,6 @@ URLRequestContext* ChromeURLRequestContextGetter::GetURLRequestContext() {
if (!url_request_context_) {
DCHECK(factory_.get());
url_request_context_ = factory_->Create();
- 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.
- net::SetURLRequestContextForOCSP(url_request_context_);
-#endif
- }
-
factory_.reset();
}
@@ -774,8 +771,7 @@ ChromeURLRequestContext::~ChromeURLRequestContext() {
}
#if defined(USE_NSS)
- if (is_main()) {
- DCHECK_EQ(this, net::GetURLRequestContextForOCSP());
+ if (this == net::GetURLRequestContextForOCSP()) {
// We are releasing the URLRequestContext used by OCSP handlers.
net::SetURLRequestContextForOCSP(NULL);
}
diff --git a/chrome/browser/net/chrome_url_request_context.h b/chrome/browser/net/chrome_url_request_context.h
index fa58bcc..ebae377 100644
--- a/chrome/browser/net/chrome_url_request_context.h
+++ b/chrome/browser/net/chrome_url_request_context.h
@@ -278,6 +278,7 @@ class ChromeURLRequestContext : public URLRequestContext {
bool is_off_the_record_;
private:
+
DISALLOW_COPY_AND_ASSIGN(ChromeURLRequestContext);
};
diff --git a/chrome/browser/profile_impl.cc b/chrome/browser/profile_impl.cc
index 8203739c..5a61e1c 100644
--- a/chrome/browser/profile_impl.cc
+++ b/chrome/browser/profile_impl.cc
@@ -722,7 +722,6 @@ URLRequestContextGetter* ProfileImpl::GetRequestContext() {
// created first.
if (!default_request_context_) {
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...
NotificationService::current()->Notify(
diff --git a/chrome/common/net/url_request_context_getter.h b/chrome/common/net/url_request_context_getter.h
index 8b51a0b..34aa668 100644
--- a/chrome/common/net/url_request_context_getter.h
+++ b/chrome/common/net/url_request_context_getter.h
@@ -35,32 +35,15 @@ class URLRequestContextGetter
// may be used).
virtual scoped_refptr<base::MessageLoopProxy> GetIOMessageLoopProxy() = 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<URLRequestContextGetter>;
friend struct URLRequestContextGetterTraits;
- URLRequestContextGetter() : is_main_(false) {}
-
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();
-
- // Indicates whether or not this is the default URLRequestContextGetter for
- // the main Profile.
- bool is_main_;
};
struct URLRequestContextGetterTraits {
@@ -70,3 +53,4 @@ struct URLRequestContextGetterTraits {
};
#endif // CHROME_COMMON_NET_URL_REQUEST_CONTEXT_GETTER_H_
+