shill: Make multiple TCP connections in ConnectionHealthChecker and
decide based on the whole sample

BUG=chromium:232136
TEST=(1) Build and run unit-tests
     (2) Test that there aren't many false positives in out-of-credit
         detection.

Change-Id: I3fa9d926536a2085dcdd8e6f7f92363e437a0b9f
Reviewed-on: https://gerrit.chromium.org/gerrit/48860
Commit-Queue: Prathmesh Prabhu <pprabhu@chromium.org>
Reviewed-by: Prathmesh Prabhu <pprabhu@chromium.org>
Tested-by: Prathmesh Prabhu <pprabhu@chromium.org>
4 files changed
tree: 2cddfbd817030a1b1078c029a8bb6a32aded19c3
  1. bin/
  2. data/
  3. dbus_bindings/
  4. doc/
  5. shims/
  6. test-scripts/
  7. .gitignore
  8. accessor_interface.h
  9. activating_iccid_store.cc
  10. activating_iccid_store.h
  11. activating_iccid_store_unittest.cc
  12. adaptor_interfaces.h
  13. arp_client.cc
  14. arp_client.h
  15. arp_client_unittest.cc
  16. arp_packet.cc
  17. arp_packet.h
  18. arp_packet_unittest.cc
  19. async_connection.cc
  20. async_connection.h
  21. async_connection_unittest.cc
  22. attribute_list.cc
  23. attribute_list.h
  24. byte_string.cc
  25. byte_string.h
  26. byte_string_unittest.cc
  27. callback80211_metrics.cc
  28. callback80211_metrics.h
  29. callbacks.h
  30. cellular.cc
  31. cellular.h
  32. cellular_capability.cc
  33. cellular_capability.h
  34. cellular_capability_cdma.cc
  35. cellular_capability_cdma.h
  36. cellular_capability_cdma_unittest.cc
  37. cellular_capability_classic.cc
  38. cellular_capability_classic.h
  39. cellular_capability_classic_unittest.cc
  40. cellular_capability_gsm.cc
  41. cellular_capability_gsm.h
  42. cellular_capability_gsm_unittest.cc
  43. cellular_capability_universal.cc
  44. cellular_capability_universal.h
  45. cellular_capability_universal_unittest.cc
  46. cellular_error.cc
  47. cellular_error.h
  48. cellular_operator_info.cc
  49. cellular_operator_info.h
  50. cellular_operator_info_unittest.cc
  51. cellular_service.cc
  52. cellular_service.h
  53. cellular_service_unittest.cc
  54. cellular_unittest.cc
  55. certificate_file.cc
  56. certificate_file.h
  57. certificate_file_unittest.cc
  58. connection.cc
  59. connection.h
  60. connection_health_checker.cc
  61. connection_health_checker.h
  62. connection_health_checker_unittest.cc
  63. connection_info.cc
  64. connection_info.h
  65. connection_info_reader.cc
  66. connection_info_reader.h
  67. connection_info_reader_unittest.cc
  68. connection_info_unittest.cc
  69. connection_unittest.cc
  70. control_interface.h
  71. control_netlink_attribute.cc
  72. control_netlink_attribute.h
  73. crypto_des_cbc.cc
  74. crypto_des_cbc.h
  75. crypto_des_cbc_unittest.cc
  76. crypto_interface.h
  77. crypto_provider.cc
  78. crypto_provider.h
  79. crypto_provider_unittest.cc
  80. crypto_rot47.cc
  81. crypto_rot47.h
  82. crypto_rot47_unittest.cc
  83. crypto_util_proxy.cc
  84. crypto_util_proxy.h
  85. crypto_util_proxy_unittest.cc
  86. dbus_adaptor.cc
  87. dbus_adaptor.h
  88. dbus_adaptor_unittest.cc
  89. dbus_control.cc
  90. dbus_control.h
  91. dbus_manager.cc
  92. dbus_manager.h
  93. dbus_manager_unittest.cc
  94. dbus_objectmanager_proxy.cc
  95. dbus_objectmanager_proxy.h
  96. dbus_objectmanager_proxy_interface.h
  97. dbus_properties.cc
  98. dbus_properties.h
  99. dbus_properties_proxy.cc
  100. dbus_properties_proxy.h
  101. dbus_properties_proxy_interface.h
  102. dbus_properties_unittest.cc
  103. dbus_property_matchers.h
  104. dbus_service_proxy.cc
  105. dbus_service_proxy.h
  106. dbus_service_proxy_interface.h
  107. dbus_variant_gmock_printer.cc
  108. dbus_variant_gmock_printer.h
  109. default_profile.cc
  110. default_profile.h
  111. default_profile_unittest.cc
  112. device.cc
  113. device.h
  114. device_dbus_adaptor.cc
  115. device_dbus_adaptor.h
  116. device_info.cc
  117. device_info.h
  118. device_info_unittest.cc
  119. device_stub.h
  120. device_unittest.cc
  121. dhcp_config.cc
  122. dhcp_config.h
  123. dhcp_config_unittest.cc
  124. dhcp_provider.cc
  125. dhcp_provider.h
  126. dhcp_provider_unittest.cc
  127. dhcp_proxy_interface.h
  128. dhcpcd_proxy.cc
  129. dhcpcd_proxy.h
  130. diagnostics_reporter.cc
  131. diagnostics_reporter.h
  132. diagnostics_reporter_unittest.cc
  133. dns_client.cc
  134. dns_client.h
  135. dns_client_factory.cc
  136. dns_client_factory.h
  137. dns_client_unittest.cc
  138. eap_credentials.cc
  139. eap_credentials.h
  140. eap_credentials_unittest.cc
  141. eap_listener.cc
  142. eap_listener.h
  143. eap_listener_unittest.cc
  144. eap_protocol.h
  145. endpoint.cc
  146. endpoint.h
  147. ephemeral_profile.cc
  148. ephemeral_profile.h
  149. error.cc
  150. error.h
  151. error_unittest.cc
  152. ethernet.cc
  153. ethernet.h
  154. ethernet_eap_provider.cc
  155. ethernet_eap_provider.h
  156. ethernet_eap_provider_unittest.cc
  157. ethernet_eap_service.cc
  158. ethernet_eap_service.h
  159. ethernet_eap_service_unittest.cc
  160. ethernet_service.cc
  161. ethernet_service.h
  162. ethernet_service_unittest.cc
  163. ethernet_unittest.cc
  164. event_dispatcher.cc
  165. event_dispatcher.h
  166. file_io.cc
  167. file_io.h
  168. file_reader.cc
  169. file_reader.h
  170. file_reader_unittest.cc
  171. generic_netlink_message.cc
  172. generic_netlink_message.h
  173. geolocation_info.cc
  174. geolocation_info.h
  175. glib.cc
  176. glib.h
  177. glib_io_input_handler.cc
  178. glib_io_input_handler.h
  179. glib_io_ready_handler.cc
  180. glib_io_ready_handler.h
  181. HACKING
  182. hook_table.cc
  183. hook_table.h
  184. hook_table_unittest.cc
  185. http_proxy.cc
  186. http_proxy.h
  187. http_proxy_unittest.cc
  188. http_request.cc
  189. http_request.h
  190. http_request_unittest.cc
  191. http_url.cc
  192. http_url.h
  193. http_url_unittest.cc
  194. ieee80211.h
  195. io_handler.h
  196. ip_address.cc
  197. ip_address.h
  198. ip_address_unittest.cc
  199. ipconfig.cc
  200. ipconfig.h
  201. ipconfig_dbus_adaptor.cc
  202. ipconfig_dbus_adaptor.h
  203. ipconfig_unittest.cc
  204. key_file_store.cc
  205. key_file_store.h
  206. key_file_store_unittest.cc
  207. key_value_store.cc
  208. key_value_store.h
  209. key_value_store_unittest.cc
  210. l2tp_ipsec_driver.cc
  211. l2tp_ipsec_driver.h
  212. l2tp_ipsec_driver_unittest.cc
  213. LICENSE
  214. link_monitor.cc
  215. link_monitor.h
  216. link_monitor_unittest.cc
  217. logging.h
  218. Makefile
  219. manager.cc
  220. manager.h
  221. manager_dbus_adaptor.cc
  222. manager_dbus_adaptor.h
  223. manager_unittest.cc
  224. memory_log.cc
  225. memory_log.h
  226. memory_log_unittest.cc
  227. metrics.cc
  228. metrics.h
  229. metrics_unittest.cc
  230. minijail.cc
  231. minijail.h
  232. mm1_bearer_proxy.cc
  233. mm1_bearer_proxy.h
  234. mm1_bearer_proxy_interface.h
  235. mm1_modem_location_proxy.cc
  236. mm1_modem_location_proxy.h
  237. mm1_modem_location_proxy_interface.h
  238. mm1_modem_modem3gpp_proxy.cc
  239. mm1_modem_modem3gpp_proxy.h
  240. mm1_modem_modem3gpp_proxy_interface.h
  241. mm1_modem_modemcdma_proxy.cc
  242. mm1_modem_modemcdma_proxy.h
  243. mm1_modem_modemcdma_proxy_interface.h
  244. mm1_modem_proxy.cc
  245. mm1_modem_proxy.h
  246. mm1_modem_proxy_interface.h
  247. mm1_modem_simple_proxy.cc
  248. mm1_modem_simple_proxy.h
  249. mm1_modem_simple_proxy_interface.h
  250. mm1_modem_time_proxy.cc
  251. mm1_modem_time_proxy.h
  252. mm1_modem_time_proxy_interface.h
  253. mm1_sim_proxy.cc
  254. mm1_sim_proxy.h
  255. mm1_sim_proxy_interface.h
  256. mock_activating_iccid_store.cc
  257. mock_activating_iccid_store.h
  258. mock_adaptors.cc
  259. mock_adaptors.h
  260. mock_ares.cc
  261. mock_ares.h
  262. mock_arp_client.cc
  263. mock_arp_client.h
  264. mock_async_connection.cc
  265. mock_async_connection.h
  266. mock_cellular.cc
  267. mock_cellular.h
  268. mock_cellular_operator_info.cc
  269. mock_cellular_operator_info.h
  270. mock_cellular_service.cc
  271. mock_cellular_service.h
  272. mock_certificate_file.cc
  273. mock_certificate_file.h
  274. mock_connection.cc
  275. mock_connection.h
  276. mock_connection_health_checker.cc
  277. mock_connection_health_checker.h
  278. mock_connection_info_reader.cc
  279. mock_connection_info_reader.h
  280. mock_control.cc
  281. mock_control.h
  282. mock_crypto_util_proxy.h
  283. mock_dbus_manager.cc
  284. mock_dbus_manager.h
  285. mock_dbus_objectmanager_proxy.cc
  286. mock_dbus_objectmanager_proxy.h
  287. mock_dbus_properties_proxy.cc
  288. mock_dbus_properties_proxy.h
  289. mock_dbus_service_proxy.cc
  290. mock_dbus_service_proxy.h
  291. mock_device.cc
  292. mock_device.h
  293. mock_device_info.cc
  294. mock_device_info.h
  295. mock_dhcp_config.cc
  296. mock_dhcp_config.h
  297. mock_dhcp_provider.cc
  298. mock_dhcp_provider.h
  299. mock_dhcp_proxy.cc
  300. mock_dhcp_proxy.h
  301. mock_diagnostics_reporter.cc
  302. mock_diagnostics_reporter.h
  303. mock_dns_client.cc
  304. mock_dns_client.h
  305. mock_dns_client_factory.cc
  306. mock_dns_client_factory.h
  307. mock_eap_credentials.cc
  308. mock_eap_credentials.h
  309. mock_eap_listener.cc
  310. mock_eap_listener.h
  311. mock_ethernet.cc
  312. mock_ethernet.h
  313. mock_ethernet_eap_provider.cc
  314. mock_ethernet_eap_provider.h
  315. mock_ethernet_service.cc
  316. mock_ethernet_service.h
  317. mock_event_dispatcher.cc
  318. mock_event_dispatcher.h
  319. mock_file_io.h
  320. mock_glib.cc
  321. mock_glib.h
  322. mock_http_request.cc
  323. mock_http_request.h
  324. mock_ipconfig.cc
  325. mock_ipconfig.h
  326. mock_link_monitor.cc
  327. mock_link_monitor.h
  328. mock_log.cc
  329. mock_log.h
  330. mock_log_unittest.cc
  331. mock_manager.cc
  332. mock_manager.h
  333. mock_metrics.cc
  334. mock_metrics.h
  335. mock_minijail.cc
  336. mock_minijail.h
  337. mock_mm1_bearer_proxy.cc
  338. mock_mm1_bearer_proxy.h
  339. mock_mm1_modem_location_proxy.cc
  340. mock_mm1_modem_location_proxy.h
  341. mock_mm1_modem_modem3gpp_proxy.cc
  342. mock_mm1_modem_modem3gpp_proxy.h
  343. mock_mm1_modem_modemcdma_proxy.cc
  344. mock_mm1_modem_modemcdma_proxy.h
  345. mock_mm1_modem_proxy.cc
  346. mock_mm1_modem_proxy.h
  347. mock_mm1_modem_simple_proxy.cc
  348. mock_mm1_modem_simple_proxy.h
  349. mock_mm1_modem_time_proxy.cc
  350. mock_mm1_modem_time_proxy.h
  351. mock_mm1_sim_proxy.cc
  352. mock_mm1_sim_proxy.h
  353. mock_modem.cc
  354. mock_modem.h
  355. mock_modem_cdma_proxy.cc
  356. mock_modem_cdma_proxy.h
  357. mock_modem_gobi_proxy.cc
  358. mock_modem_gobi_proxy.h
  359. mock_modem_gsm_card_proxy.cc
  360. mock_modem_gsm_card_proxy.h
  361. mock_modem_gsm_network_proxy.cc
  362. mock_modem_gsm_network_proxy.h
  363. mock_modem_info.cc
  364. mock_modem_info.h
  365. mock_modem_manager_proxy.cc
  366. mock_modem_manager_proxy.h
  367. mock_modem_proxy.cc
  368. mock_modem_proxy.h
  369. mock_modem_simple_proxy.cc
  370. mock_modem_simple_proxy.h
  371. mock_netlink_manager.h
  372. mock_netlink_socket.h
  373. mock_nss.cc
  374. mock_nss.h
  375. mock_openvpn_driver.cc
  376. mock_openvpn_driver.h
  377. mock_openvpn_management_server.cc
  378. mock_openvpn_management_server.h
  379. mock_portal_detector.cc
  380. mock_portal_detector.h
  381. mock_power_manager.cc
  382. mock_power_manager.h
  383. mock_power_manager_proxy.cc
  384. mock_power_manager_proxy.h
  385. mock_process_killer.cc
  386. mock_process_killer.h
  387. mock_profile.cc
  388. mock_profile.h
  389. mock_property_store.cc
  390. mock_property_store.h
  391. mock_proxy_factory.cc
  392. mock_proxy_factory.h
  393. mock_resolver.cc
  394. mock_resolver.h
  395. mock_routing_table.cc
  396. mock_routing_table.h
  397. mock_rtnl_handler.cc
  398. mock_rtnl_handler.h
  399. mock_service.cc
  400. mock_service.h
  401. mock_socket_info_reader.cc
  402. mock_socket_info_reader.h
  403. mock_sockets.cc
  404. mock_sockets.h
  405. mock_store.cc
  406. mock_store.h
  407. mock_supplicant_bss_proxy.cc
  408. mock_supplicant_bss_proxy.h
  409. mock_supplicant_eap_state_handler.cc
  410. mock_supplicant_eap_state_handler.h
  411. mock_supplicant_interface_proxy.cc
  412. mock_supplicant_interface_proxy.h
  413. mock_supplicant_network_proxy.cc
  414. mock_supplicant_network_proxy.h
  415. mock_supplicant_process_proxy.cc
  416. mock_supplicant_process_proxy.h
  417. mock_time.cc
  418. mock_time.h
  419. mock_traffic_monitor.cc
  420. mock_traffic_monitor.h
  421. mock_vpn.cc
  422. mock_vpn.h
  423. mock_vpn_driver.cc
  424. mock_vpn_driver.h
  425. mock_vpn_provider.cc
  426. mock_vpn_provider.h
  427. mock_vpn_service.cc
  428. mock_vpn_service.h
  429. mock_wifi.cc
  430. mock_wifi.h
  431. mock_wifi_provider.cc
  432. mock_wifi_provider.h
  433. mock_wifi_service.cc
  434. mock_wifi_service.h
  435. mock_wimax.cc
  436. mock_wimax.h
  437. mock_wimax_device_proxy.cc
  438. mock_wimax_device_proxy.h
  439. mock_wimax_manager_proxy.cc
  440. mock_wimax_manager_proxy.h
  441. mock_wimax_network_proxy.cc
  442. mock_wimax_network_proxy.h
  443. mock_wimax_provider.cc
  444. mock_wimax_provider.h
  445. mock_wimax_service.cc
  446. mock_wimax_service.h
  447. modem.cc
  448. modem.h
  449. modem_1.cc
  450. modem_1_unittest.cc
  451. modem_cdma_proxy.cc
  452. modem_cdma_proxy.h
  453. modem_cdma_proxy_interface.h
  454. modem_classic.cc
  455. modem_gobi_proxy.cc
  456. modem_gobi_proxy.h
  457. modem_gobi_proxy_interface.h
  458. modem_gsm_card_proxy.cc
  459. modem_gsm_card_proxy.h
  460. modem_gsm_card_proxy_interface.h
  461. modem_gsm_network_proxy.cc
  462. modem_gsm_network_proxy.h
  463. modem_gsm_network_proxy_interface.h
  464. modem_info.cc
  465. modem_info.h
  466. modem_info_unittest.cc
  467. modem_manager.cc
  468. modem_manager.h
  469. modem_manager_1.cc
  470. modem_manager_proxy.cc
  471. modem_manager_proxy.h
  472. modem_manager_proxy_interface.h
  473. modem_manager_unittest.cc
  474. modem_proxy.cc
  475. modem_proxy.h
  476. modem_proxy_interface.h
  477. modem_simple_proxy.cc
  478. modem_simple_proxy.h
  479. modem_simple_proxy_interface.h
  480. modem_unittest.cc
  481. netlink_attribute.cc
  482. netlink_attribute.h
  483. netlink_manager.cc
  484. netlink_manager.h
  485. netlink_manager_unittest.cc
  486. netlink_message.cc
  487. netlink_message.h
  488. netlink_message_unittest.cc
  489. netlink_socket.cc
  490. netlink_socket.h
  491. netlink_socket_unittest.cc
  492. nice_mock_control.cc
  493. nice_mock_control.h
  494. nl80211_attribute.cc
  495. nl80211_attribute.h
  496. nl80211_message.cc
  497. nl80211_message.h
  498. nss.cc
  499. nss.h
  500. nss_unittest.cc
  501. openvpn_driver.cc
  502. openvpn_driver.h
  503. openvpn_driver_unittest.cc
  504. openvpn_management_server.cc
  505. openvpn_management_server.h
  506. openvpn_management_server_unittest.cc
  507. portal_detector.cc
  508. portal_detector.h
  509. portal_detector_unittest.cc
  510. power_manager.cc
  511. power_manager.h
  512. power_manager_proxy.cc
  513. power_manager_proxy.h
  514. power_manager_proxy_interface.h
  515. power_manager_unittest.cc
  516. process_killer.cc
  517. process_killer.h
  518. process_killer_unittest.cc
  519. profile.cc
  520. profile.h
  521. profile_dbus_adaptor.cc
  522. profile_dbus_adaptor.h
  523. profile_dbus_property_exporter.cc
  524. profile_dbus_property_exporter.h
  525. profile_dbus_property_exporter_unittest.cc
  526. profile_unittest.cc
  527. property_accessor.h
  528. property_accessor_unittest.cc
  529. property_iterator.h
  530. property_store.cc
  531. property_store.h
  532. property_store_unittest.cc
  533. property_store_unittest.h
  534. provider_db_unittest.bfd
  535. proxy_factory.cc
  536. proxy_factory.h
  537. refptr_types.h
  538. resolver.cc
  539. resolver.h
  540. resolver_unittest.cc
  541. routing_table.cc
  542. routing_table.h
  543. routing_table_entry.h
  544. routing_table_unittest.cc
  545. rpc_task.cc
  546. rpc_task.h
  547. rpc_task_dbus_adaptor.cc
  548. rpc_task_dbus_adaptor.h
  549. rpc_task_unittest.cc
  550. rtnl_handler.cc
  551. rtnl_handler.h
  552. rtnl_handler_unittest.cc
  553. rtnl_listener.cc
  554. rtnl_listener.h
  555. rtnl_listener_unittest.cc
  556. rtnl_message.cc
  557. rtnl_message.h
  558. rtnl_message_unittest.cc
  559. scope_logger.cc
  560. scope_logger.h
  561. scope_logger_unittest.cc
  562. service.cc
  563. service.h
  564. service_dbus_adaptor.cc
  565. service_dbus_adaptor.h
  566. service_sorter.h
  567. service_under_test.cc
  568. service_under_test.h
  569. service_unittest.cc
  570. shill_ares.cc
  571. shill_ares.h
  572. shill_config.cc
  573. shill_config.h
  574. shill_daemon.cc
  575. shill_daemon.h
  576. shill_main.cc
  577. shill_test_config.cc
  578. shill_test_config.h
  579. shill_time.cc
  580. shill_time.h
  581. shill_unittest.cc
  582. socket_info.cc
  583. socket_info.h
  584. socket_info_reader.cc
  585. socket_info_reader.h
  586. socket_info_reader_unittest.cc
  587. socket_info_unittest.cc
  588. sockets.cc
  589. sockets.h
  590. static_ip_parameters.cc
  591. static_ip_parameters.h
  592. static_ip_parameters_unittest.cc
  593. store_interface.h
  594. supplicant_bss_proxy.cc
  595. supplicant_bss_proxy.h
  596. supplicant_bss_proxy_interface.h
  597. supplicant_eap_state_handler.cc
  598. supplicant_eap_state_handler.h
  599. supplicant_eap_state_handler_unittest.cc
  600. supplicant_event_delegate_interface.h
  601. supplicant_interface_proxy.cc
  602. supplicant_interface_proxy.h
  603. supplicant_interface_proxy_interface.h
  604. supplicant_network_proxy.cc
  605. supplicant_network_proxy.h
  606. supplicant_network_proxy_interface.h
  607. supplicant_process_proxy.cc
  608. supplicant_process_proxy.h
  609. supplicant_process_proxy_interface.h
  610. technology.cc
  611. technology.h
  612. technology_unittest.cc
  613. TESTING
  614. testrunner.cc
  615. traffic_monitor.cc
  616. traffic_monitor.h
  617. traffic_monitor_unittest.cc
  618. virtio_ethernet.cc
  619. virtio_ethernet.h
  620. vpn.cc
  621. vpn.h
  622. vpn_driver.cc
  623. vpn_driver.h
  624. vpn_driver_unittest.cc
  625. vpn_provider.cc
  626. vpn_provider.h
  627. vpn_provider_unittest.cc
  628. vpn_service.cc
  629. vpn_service.h
  630. vpn_service_unittest.cc
  631. vpn_unittest.cc
  632. wifi.cc
  633. wifi.h
  634. wifi_endpoint.cc
  635. wifi_endpoint.h
  636. wifi_endpoint_unittest.cc
  637. wifi_provider.cc
  638. wifi_provider.h
  639. wifi_provider_unittest.cc
  640. wifi_service.cc
  641. wifi_service.h
  642. wifi_service_unittest.cc
  643. wifi_unittest.cc
  644. wimax.cc
  645. wimax.h
  646. wimax_device_proxy.cc
  647. wimax_device_proxy.h
  648. wimax_device_proxy_interface.h
  649. wimax_manager_proxy.cc
  650. wimax_manager_proxy.h
  651. wimax_manager_proxy_interface.h
  652. wimax_network_proxy.cc
  653. wimax_network_proxy.h
  654. wimax_network_proxy_interface.h
  655. wimax_provider.cc
  656. wimax_provider.h
  657. wimax_provider_unittest.cc
  658. wimax_service.cc
  659. wimax_service.h
  660. wimax_service_unittest.cc
  661. wimax_unittest.cc
  662. wpa_supplicant.cc
  663. wpa_supplicant.h
  664. wpa_supplicant_unittest.cc