summaryrefslogtreecommitdiffstats
path: root/net/BUILD.gn
diff options
context:
space:
mode:
authormmenke@chromium.org <mmenke@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-07 15:05:29 +0000
committermmenke@chromium.org <mmenke@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-07 15:05:29 +0000
commit02494ec2e31ee6f69898e560ab3f7812fbbda1cc (patch)
treef5e13d18320e36ac769dc861b82767bc206ef59e /net/BUILD.gn
parent182561f042ab34e010e498299b1e6354bc0a44e9 (diff)
downloadchromium_src-02494ec2e31ee6f69898e560ab3f7812fbbda1cc.zip
chromium_src-02494ec2e31ee6f69898e560ab3f7812fbbda1cc.tar.gz
chromium_src-02494ec2e31ee6f69898e560ab3f7812fbbda1cc.tar.bz2
Make it so net/ can be built without file:// support.
This is a step towards making it possible to build net/ without ICU. ICU is used by directory_lister.cc, which is used for creating file directory listings. BUG=362608 R=mef@chromium.org Review URL: https://codereview.chromium.org/253603004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@268766 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/BUILD.gn')
-rw-r--r--net/BUILD.gn21
1 files changed, 21 insertions, 0 deletions
diff --git a/net/BUILD.gn b/net/BUILD.gn
index 6ee299a..a6760e4 100644
--- a/net/BUILD.gn
+++ b/net/BUILD.gn
@@ -37,6 +37,11 @@ enable_websockets = !is_ios
use_v8_in_net = false # TODO(brettw)!is_ios
enable_built_in_dns = !is_ios
+declare_args() {
+ # Disables support for file URLs. File URL support requires use of icu.
+ disable_file_support = false
+}
+
enable_ftp_support = !is_ios
config("net_config") {
@@ -44,6 +49,9 @@ config("net_config") {
if (posix_avoid_mmap) {
defines += [ "POSIX_AVOID_MMAP" ]
}
+ if (disable_file_support) {
+ defines += [ "DISABLE_FILE_SUPPORT" ]
+ }
}
# Disables Windows warning about size to int truncations.
@@ -108,6 +116,19 @@ component("net") {
}
}
+ if (disable_file_support) {
+ sources -= [
+ "base/directory_lister.cc",
+ "base/directory_lister.h",
+ "url_request/url_request_file_dir_job.cc",
+ "url_request/url_request_file_dir_job.h",
+ "url_request/url_request_file_job.cc",
+ "url_request/url_request_file_job.h",
+ "url_request/file_protocol_handler.cc",
+ "url_request/file_protocol_handler.h",
+ ]
+ }
+
if (!enable_ftp_support) {
sources -= [
"ftp/ftp_auth_cache.cc",