Merge branch 'master' into node_dbg_release_split
diff --git a/binding.gyp b/binding.gyp
index f941dc7..32ea5d8 100644
--- a/binding.gyp
+++ b/binding.gyp
@@ -39,11 +39,9 @@
 {
   'variables': {
     'runtime%': 'node',
-    # UV integration in C core is disabled by default while bugs are ironed
-    # out. It can be re-enabled for one build by setting the npm config
-    # variable grpc_uv to true, and it can be re-enabled permanently by
-    # setting it to true here.
-    'grpc_uv%': 'false',
+    # UV integration in C core is enabled by default. It can be disabled
+    # by setting this argument to anything else.
+    'grpc_uv%': 'true',
     # Some Node installations use the system installation of OpenSSL, and on
     # some systems, the system OpenSSL still does not have ALPN support. This
     # will let users recompile gRPC to work without ALPN.
@@ -93,6 +91,9 @@
     'conditions': [
       ['grpc_uv=="true"', {
         'defines': [
+          'GRPC_ARES=0',
+          # Disabling this while bugs are ironed out. Uncomment this to
+          # re-enable libuv integration in C core.
           'GRPC_UV'
         ]
       }],
@@ -156,7 +157,8 @@
       }],
       ['OS == "win"', {
         "include_dirs": [
-          "third_party/zlib"
+          "third_party/zlib",
+          "third_party/cares/cares"
         ],
         "defines": [
           '_WIN32_WINNT=0x0600',
@@ -176,7 +178,8 @@
         ]
       }, { # OS != "win"
         'include_dirs': [
-          '<(node_root_dir)/deps/zlib'
+          '<(node_root_dir)/deps/zlib',
+          '<(node_root_dir)/deps/cares/include'
         ]
       }]
     ]
@@ -563,6 +566,7 @@
     }]
   ],
   'targets': [
+
     {
       'cflags': [
         '-std=c99',
@@ -641,6 +645,7 @@
       'type': 'static_library',
       'dependencies': [
         'gpr',
+        'node_modules/cares/deps/cares/cares.gyp:cares',
       ],
       'sources': [
         'src/core/lib/surface/init.c',
@@ -655,6 +660,7 @@
         'src/core/lib/channel/handshaker_registry.c',
         'src/core/lib/channel/http_client_filter.c',
         'src/core/lib/channel/http_server_filter.c',
+        'src/core/lib/channel/max_age_filter.c',
         'src/core/lib/channel/message_size_filter.c',
         'src/core/lib/compression/compression.c',
         'src/core/lib/compression/message_compress.c',
@@ -691,6 +697,7 @@
         'src/core/lib/iomgr/resolve_address_windows.c',
         'src/core/lib/iomgr/resource_quota.c',
         'src/core/lib/iomgr/sockaddr_utils.c',
+        'src/core/lib/iomgr/socket_factory_posix.c',
         'src/core/lib/iomgr/socket_mutator.c',
         'src/core/lib/iomgr/socket_utils_common_posix.c',
         'src/core/lib/iomgr/socket_utils_linux.c',
@@ -728,6 +735,7 @@
         'src/core/lib/json/json_reader.c',
         'src/core/lib/json/json_string.c',
         'src/core/lib/json/json_writer.c',
+        'src/core/lib/slice/b64.c',
         'src/core/lib/slice/percent_encoding.c',
         'src/core/lib/slice/slice.c',
         'src/core/lib/slice/slice_buffer.c',
@@ -746,6 +754,7 @@
         'src/core/lib/surface/channel_ping.c',
         'src/core/lib/surface/channel_stack_type.c',
         'src/core/lib/surface/completion_queue.c',
+        'src/core/lib/surface/completion_queue_factory.c',
         'src/core/lib/surface/event_string.c',
         'src/core/lib/surface/lame_client.c',
         'src/core/lib/surface/metadata_array.c',
@@ -809,12 +818,11 @@
         'src/core/lib/security/transport/security_handshaker.c',
         'src/core/lib/security/transport/server_auth_filter.c',
         'src/core/lib/security/transport/tsi_error.c',
-        'src/core/lib/security/util/b64.c',
         'src/core/lib/security/util/json_util.c',
         'src/core/lib/surface/init_secure.c',
-        'src/core/lib/tsi/fake_transport_security.c',
-        'src/core/lib/tsi/ssl_transport_security.c',
-        'src/core/lib/tsi/transport_security.c',
+        'src/core/tsi/fake_transport_security.c',
+        'src/core/tsi/ssl_transport_security.c',
+        'src/core/tsi/transport_security.c',
         'src/core/ext/transport/chttp2/server/chttp2_server.c',
         'src/core/ext/transport/chttp2/client/secure/secure_channel_create.c',
         'src/core/ext/client_channel/channel_connectivity.c',
@@ -851,6 +859,9 @@
         'third_party/nanopb/pb_encode.c',
         'src/core/ext/lb_policy/pick_first/pick_first.c',
         'src/core/ext/lb_policy/round_robin/round_robin.c',
+        'src/core/ext/resolver/dns/c_ares/dns_resolver_ares.c',
+        'src/core/ext/resolver/dns/c_ares/grpc_ares_ev_driver_posix.c',
+        'src/core/ext/resolver/dns/c_ares/grpc_ares_wrapper.c',
         'src/core/ext/resolver/dns/native/dns_resolver.c',
         'src/core/ext/resolver/sockaddr/sockaddr_resolver.c',
         'src/core/ext/load_reporting/load_reporting.c',
@@ -935,6 +946,7 @@
       "dependencies": [
         "grpc",
         "gpr",
+        "node_modules/cares/deps/cares/cares.gyp:cares",
       ]
     },
     {