Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(526)

Unified Diff: net/url_request/url_request_job_factory_impl.cc

Issue 12217095: Remove unused pieces of URLRequestJobFactory API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: net/url_request/url_request_job_factory_impl.cc
diff --git a/net/url_request/url_request_job_factory_impl.cc b/net/url_request/url_request_job_factory_impl.cc
index aaeed79132b443ead616f4b3e0d360f6de03c328..f4c1d01fbd730ad106e2bdc6da13d37a2f580c19 100644
--- a/net/url_request/url_request_job_factory_impl.cc
+++ b/net/url_request/url_request_job_factory_impl.cc
@@ -15,7 +15,6 @@ URLRequestJobFactoryImpl::URLRequestJobFactoryImpl() {}
URLRequestJobFactoryImpl::~URLRequestJobFactoryImpl() {
STLDeleteValues(&protocol_handler_map_);
- STLDeleteElements(&interceptors_);
}
bool URLRequestJobFactoryImpl::SetProtocolHandler(
@@ -39,29 +38,6 @@ bool URLRequestJobFactoryImpl::SetProtocolHandler(
return true;
}
-void URLRequestJobFactoryImpl::AddInterceptor(Interceptor* interceptor) {
- DCHECK(CalledOnValidThread());
- CHECK(interceptor);
-
- interceptors_.push_back(interceptor);
-}
-
-URLRequestJob* URLRequestJobFactoryImpl::MaybeCreateJobWithInterceptor(
- URLRequest* request, NetworkDelegate* network_delegate) const {
- DCHECK(CalledOnValidThread());
- URLRequestJob* job = NULL;
-
- if (!(request->load_flags() & LOAD_DISABLE_INTERCEPT)) {
- InterceptorList::const_iterator i;
- for (i = interceptors_.begin(); i != interceptors_.end(); ++i) {
- job = (*i)->MaybeIntercept(request, network_delegate);
- if (job)
- return job;
- }
- }
- return NULL;
-}
-
URLRequestJob* URLRequestJobFactoryImpl::MaybeCreateJobWithProtocolHandler(
const std::string& scheme,
URLRequest* request,
@@ -73,48 +49,9 @@ URLRequestJob* URLRequestJobFactoryImpl::MaybeCreateJobWithProtocolHandler(
return it->second->MaybeCreateJob(request, network_delegate);
}
-URLRequestJob* URLRequestJobFactoryImpl::MaybeInterceptRedirect(
- const GURL& location,
- URLRequest* request,
- NetworkDelegate* network_delegate) const {
- DCHECK(CalledOnValidThread());
- URLRequestJob* job = NULL;
-
- if (!(request->load_flags() & LOAD_DISABLE_INTERCEPT)) {
- InterceptorList::const_iterator i;
- for (i = interceptors_.begin(); i != interceptors_.end(); ++i) {
- job = (*i)->MaybeInterceptRedirect(location, request, network_delegate);
- if (job)
- return job;
- }
- }
- return NULL;
-}
-
-URLRequestJob* URLRequestJobFactoryImpl::MaybeInterceptResponse(
- URLRequest* request, NetworkDelegate* network_delegate) const {
- DCHECK(CalledOnValidThread());
- URLRequestJob* job = NULL;
-
- if (!(request->load_flags() & LOAD_DISABLE_INTERCEPT)) {
- InterceptorList::const_iterator i;
- for (i = interceptors_.begin(); i != interceptors_.end(); ++i) {
- job = (*i)->MaybeInterceptResponse(request, network_delegate);
- if (job)
- return job;
- }
- }
- return NULL;
-}
-
bool URLRequestJobFactoryImpl::IsHandledProtocol(
const std::string& scheme) const {
DCHECK(CalledOnValidThread());
- InterceptorList::const_iterator i;
- for (i = interceptors_.begin(); i != interceptors_.end(); ++i) {
- if ((*i)->WillHandleProtocol(scheme))
- return true;
- }
return ContainsKey(protocol_handler_map_, scheme) ||
URLRequestJobManager::GetInstance()->SupportsScheme(scheme);
}

Powered by Google App Engine
This is Rietveld 408576698