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

Unified Diff: net/url_request/url_request_http_job.cc

Issue 11931024: Removed static factories for data, ftp, file, and about jobs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address erikwright's comments Created 7 years, 11 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_http_job.cc
diff --git a/net/url_request/url_request_http_job.cc b/net/url_request/url_request_http_job.cc
index fe5f3257695ac3a545e5e3646f1df4ec15282a4f..9fec178a9a7809a0b4d32c06dac0186a7cb6744f 100644
--- a/net/url_request/url_request_http_job.cc
+++ b/net/url_request/url_request_http_job.cc
@@ -43,6 +43,7 @@
#include "net/url_request/url_request.h"
#include "net/url_request/url_request_context.h"
#include "net/url_request/url_request_error_job.h"
+#include "net/url_request/url_request_job_factory.h"
#include "net/url_request/url_request_redirect_job.h"
#include "net/url_request/url_request_throttler_header_adapter.h"
#include "net/url_request/url_request_throttler_manager.h"
@@ -1017,8 +1018,10 @@ bool URLRequestHttpJob::IsSafeRedirect(const GURL& location) {
// restrict redirects to externally handled protocols. Our consumer would
// need to take care of those.
- if (!URLRequest::IsHandledURL(location))
+ if (!URLRequest::IsHandledURL(location) &&
+ !request_->context()->job_factory()->IsHandledURL(location)) {
mmenke 2013/01/22 16:50:37 I believe this may change behavior. In particular
pauljensen 2013/01/23 21:43:33 What makes a redirect "unsafe"? The only descript
mmenke 2013/01/23 22:09:17 I believe it encompasses everything we don't want
pauljensen 2013/01/28 19:51:49 Why wouldn't we want websites to redirect to somet
return true;
+ }
static const char* kSafeSchemes[] = {
"http",

Powered by Google App Engine
This is Rietveld 408576698