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

Unified Diff: net/url_request/url_request_job_factory.cc

Issue 7056003: Give URLRequestJobFactory::Interceptors the ability to specify protocols they handle. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 7 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.cc
diff --git a/net/url_request/url_request_job_factory.cc b/net/url_request/url_request_job_factory.cc
index 78fcb3834fae506f21fd6eb66c2509a2b33a54fd..e802f607d91b5cd55e72ff77d768571f4aac1d7b 100644
--- a/net/url_request/url_request_job_factory.cc
+++ b/net/url_request/url_request_job_factory.cc
@@ -78,6 +78,11 @@ URLRequestJob* URLRequestJobFactory::MaybeCreateJobWithProtocolHandler(
bool URLRequestJobFactory::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