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

Unified Diff: net/url_request/url_request_job_factory.h

Issue 11931024: Removed static factories for data, ftp, file, and about jobs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add test for IsSafeRedirectTarget 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.h
diff --git a/net/url_request/url_request_job_factory.h b/net/url_request/url_request_job_factory.h
index bbd1d09f09ccf1bfbfafb4a633645a4ec45c3232..dbfa5d16e16522880108d8324e0d2c1b9ab6bb96 100644
--- a/net/url_request/url_request_job_factory.h
+++ b/net/url_request/url_request_job_factory.h
@@ -30,6 +30,11 @@ class NET_EXPORT URLRequestJobFactory
virtual URLRequestJob* MaybeCreateJob(
URLRequest* request, NetworkDelegate* network_delegate) const = 0;
+
+ // Indicates if it should be safe to redirect to |location|. Should handle
+ // protocols handled by MaybeCreateJob().
mmenke 2013/02/19 17:26:15 This comment is not correct. As-is, it sounds lik
pauljensen 2013/02/20 15:13:27 I adjusted the comment to be more correct. We can
+ // NOTE(pauljensen): Default implementation returns true.
+ virtual bool IsSafeRedirectTarget(const GURL& location) const;
};
URLRequestJobFactory();
@@ -44,6 +49,8 @@ class NET_EXPORT URLRequestJobFactory
virtual bool IsHandledURL(const GURL& url) const = 0;
+ virtual bool IsSafeRedirectTarget(const GURL& location) const = 0;
+
private:
DISALLOW_COPY_AND_ASSIGN(URLRequestJobFactory);
};

Powered by Google App Engine
This is Rietveld 408576698