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

Unified Diff: net/url_request/url_request_job_factory.cc

Issue 7019030: Remove ProtocolFactory/Interceptor uses in GViewRequestInterceptor (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix release. 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
« no previous file with comments | « net/url_request/url_request_job_factory.h ('k') | net/url_request/url_request_job_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 e802f607d91b5cd55e72ff77d768571f4aac1d7b..8ef587645d19b4193b2fed0ea80f662a6ff46633 100644
--- a/net/url_request/url_request_job_factory.cc
+++ b/net/url_request/url_request_job_factory.cc
@@ -76,6 +76,39 @@ URLRequestJob* URLRequestJobFactory::MaybeCreateJobWithProtocolHandler(
return it->second->MaybeCreateJob(request);
}
+URLRequestJob* URLRequestJobFactory::MaybeInterceptRedirect(
+ const GURL& location,
+ URLRequest* request) 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);
+ if (job)
+ return job;
+ }
+ }
+ return NULL;
+}
+
+URLRequestJob* URLRequestJobFactory::MaybeInterceptResponse(
+ URLRequest* request) 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);
+ if (job)
+ return job;
+ }
+ }
+ return NULL;
+}
+
bool URLRequestJobFactory::IsHandledProtocol(const std::string& scheme) const {
DCHECK(CalledOnValidThread());
InterceptorList::const_iterator i;
« no previous file with comments | « net/url_request/url_request_job_factory.h ('k') | net/url_request/url_request_job_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698