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

Unified Diff: net/url_request/url_request_context_builder.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_context_builder.h
diff --git a/net/url_request/url_request_context_builder.h b/net/url_request/url_request_context_builder.h
index f1ce5707a66866e11114c837d5ab771371e56eec..1e1cc43a16309fcc170382742cba5414a5f9b72a 100644
--- a/net/url_request/url_request_context_builder.h
+++ b/net/url_request/url_request_context_builder.h
@@ -25,6 +25,7 @@
namespace net {
+class FtpTransactionFactory;
class HostMappingRules;
class ProxyConfigService;
class URLRequestContext;
@@ -85,7 +86,17 @@ class NET_EXPORT URLRequestContextBuilder {
user_agent_ = user_agent;
}
- // By default it's disabled.
+ // Control support for data:// requests. By default it's disabled.
+ void set_data_enabled(bool enable) {
+ data_enabled_ = enable;
+ }
+
+ // Control support for file:// requests. By default it's disabled.
+ void set_file_enabled(bool enable) {
+ file_enabled_ = enable;
+ }
+
+ // Control support for ftp:// requests. By default it's disabled.
void set_ftp_enabled(bool enable) {
ftp_enabled_ = enable;
}
mmenke 2013/02/19 17:26:15 There's a compile flag to disable ftp support. Sh
pauljensen 2013/02/20 15:13:27 Done.
@@ -118,6 +129,11 @@ class NET_EXPORT URLRequestContextBuilder {
std::string accept_language_;
std::string accept_charset_;
std::string user_agent_;
+ // Include support for data:// requests.
+ bool data_enabled_;
+ // Include support for file:// requests.
+ bool file_enabled_;
+ // Include support for ftp:// requests.
bool ftp_enabled_;
bool http_cache_enabled_;
HttpCacheParams http_cache_params_;
@@ -126,6 +142,7 @@ class NET_EXPORT URLRequestContextBuilder {
scoped_ptr<ProxyConfigService> proxy_config_service_;
#endif // defined(OS_LINUX) || defined(OS_ANDROID)
scoped_ptr<NetworkDelegate> network_delegate_;
+ scoped_ptr<FtpTransactionFactory> ftp_transaction_factory_;
DISALLOW_COPY_AND_ASSIGN(URLRequestContextBuilder);
};

Powered by Google App Engine
This is Rietveld 408576698