# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. { 'variables': { 'chromium_code': 1, 'linux_link_kerberos%': 0, 'conditions': [ ['chromeos==1 or embedded==1 or OS=="android" or OS=="ios"', { # Disable Kerberos on ChromeOS, Android and iOS, at least for now. # It needs configuration (krb5.conf and so on). 'use_kerberos%': 0, }, { # chromeos == 0 and embedded==0 and OS!="android" and OS!="ios" 'use_kerberos%': 1, }], ['OS=="android" and target_arch != "ia32"', { # The way the cache uses mmap() is inefficient on some Android devices. # If this flag is set, we hackily avoid using mmap() in the disk cache. # We are pretty confident that mmap-ing the index would not hurt any # existing x86 android devices, but we cannot be so sure about the # variety of ARM devices. So enable it for x86 only for now. 'posix_avoid_mmap%': 1, }, { 'posix_avoid_mmap%': 0, }], ['OS=="ios"', { # Websockets and socket stream are not used on iOS. 'enable_websockets%': 0, # iOS does not use V8. 'use_v8_in_net%': 0, 'enable_built_in_dns%': 0, }, { 'enable_websockets%': 1, 'use_v8_in_net%': 1, 'enable_built_in_dns%': 1, }], ], }, 'includes': [ '../build/win_precompile.gypi', 'net.gypi', ], 'targets': [ { 'target_name': 'net_derived_sources', 'type': 'none', 'sources': [ 'base/registry_controlled_domains/effective_tld_names.gperf', 'base/registry_controlled_domains/effective_tld_names_unittest1.gperf', 'base/registry_controlled_domains/effective_tld_names_unittest2.gperf', 'base/registry_controlled_domains/effective_tld_names_unittest3.gperf', 'base/registry_controlled_domains/effective_tld_names_unittest4.gperf', 'base/registry_controlled_domains/effective_tld_names_unittest5.gperf', 'base/registry_controlled_domains/effective_tld_names_unittest6.gperf', ], 'rules': [ { 'rule_name': 'dafsa', 'extension': 'gperf', 'outputs': [ '<(SHARED_INTERMEDIATE_DIR)/net/<(RULE_INPUT_DIRNAME)/<(RULE_INPUT_ROOT)-inc.cc', ], 'inputs': [ 'tools/tld_cleanup/make_dafsa.py', ], 'action': [ 'python', 'tools/tld_cleanup/make_dafsa.py', '<(RULE_INPUT_PATH)', '<(SHARED_INTERMEDIATE_DIR)/net/<(RULE_INPUT_DIRNAME)/<(RULE_INPUT_ROOT)-inc.cc', ], }, ], 'direct_dependent_settings': { 'include_dirs': [ '<(SHARED_INTERMEDIATE_DIR)' ], }, }, { 'target_name': 'net', 'type': '<(component)', 'variables': { 'enable_wexit_time_destructors': 1, }, 'dependencies': [ '../base/base.gyp:base', '../base/base.gyp:base_i18n', '../base/base.gyp:base_prefs', '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations', '../crypto/crypto.gyp:crypto', '../sdch/sdch.gyp:sdch', '../third_party/icu/icu.gyp:icui18n', '../third_party/icu/icu.gyp:icuuc', '../third_party/zlib/zlib.gyp:zlib', '../url/url.gyp:url_lib', 'net_derived_sources', 'net_resources', ], 'sources': [ '<@(net_nacl_common_sources)', '<@(net_non_nacl_sources)', ], 'defines': [ 'NET_IMPLEMENTATION', ], 'export_dependent_settings': [ '../base/base.gyp:base', ], 'conditions': [ ['chromeos==1', { 'sources!': [ 'base/network_change_notifier_linux.cc', 'base/network_change_notifier_linux.h', 'base/network_change_notifier_netlink_linux.cc', 'base/network_change_notifier_netlink_linux.h', 'proxy/proxy_config_service_linux.cc', 'proxy/proxy_config_service_linux.h', ], }], ['use_kerberos==1', { 'defines': [ 'USE_KERBEROS', ], 'conditions': [ ['OS=="openbsd"', { 'include_dirs': [ '/usr/include/kerberosV' ], }], ['linux_link_kerberos==1', { 'link_settings': { 'ldflags': [ '