Introduce protected member for Service auto connect cooldown max

Commit 0801d19 ("Throttle AutoConnect calls") introduces a
cooldown timeout max of 30 minutes for all services in order
to avoid a busy cycle that occurs on cellular devices when
Service::Connect fails. This poses a problem for jetstream
routers that are unable to acquire dhcp leases due to a downed
ISP server as they become defunct for 30 minutes and require
a power cycle. This change modifies the default timeout for
all services to be 1 minute and introduces a protected member,
max_auto_connect_cooldown_time_milliseconds_, which is
overridden to be the previous 30 minute value for cellular
services only.

BUG=b:27207845
TEST=Added log to Service::ThrottleFutureAutoConnects and
verified that net.log shows values reaching up to 1 minute on
veyron_minnie-cheets.

To test the cellular case, added conditional log to
Service::ThrottleFutureAutoConnects and verified that
max cooldown is set to the original 30 minutes on a link.

Change-Id: I142951a12ab00e8a963a60adda98d5e125f3f78b
Reviewed-on: https://chromium-review.googlesource.com/367500
Commit-Ready: Christopher Book <cbook@chromium.org>
Tested-by: Ian Wyszynski <wyszynski@google.com>
Reviewed-by: Ian Wyszynski <wyszynski@google.com>
Reviewed-by: Kevin Cernekee <cernekee@chromium.org>
5 files changed
tree: 151ac3bb5bf6a5fedb58e5c4006e5ce11b658436
  1. .gitignore
  2. Android.mk
  3. HACKING
  4. MODULE_LICENSE_APACHE2
  5. NETLINK_MESSAGES.txt
  6. NOTICE
  7. OWNERS
  8. PRESUBMIT.cfg
  9. TESTING
  10. accessor_interface.h
  11. active_link_monitor.cc
  12. active_link_monitor.h
  13. active_link_monitor_unittest.cc
  14. adaptor_interfaces.h
  15. adaptor_stub.cc
  16. adaptor_stub.h
  17. async_connection.cc
  18. async_connection.h
  19. async_connection_unittest.cc
  20. bin/
  21. binder/
  22. callbacks.h
  23. cellular/
  24. certificate_file.cc
  25. certificate_file.h
  26. certificate_file_unittest.cc
  27. connection.cc
  28. connection.h
  29. connection_diagnostics.cc
  30. connection_diagnostics.h
  31. connection_diagnostics_unittest.cc
  32. connection_health_checker.cc
  33. connection_health_checker.h
  34. connection_health_checker_unittest.cc
  35. connection_info.cc
  36. connection_info.h
  37. connection_info_reader.cc
  38. connection_info_reader.h
  39. connection_info_reader_unittest.cc
  40. connection_info_unittest.cc
  41. connection_tester.cc
  42. connection_tester.h
  43. connection_tester_unittest.cc
  44. connection_unittest.cc
  45. connectivity_trial.cc
  46. connectivity_trial.h
  47. connectivity_trial_unittest.cc
  48. control_interface.h
  49. crypto_des_cbc.cc
  50. crypto_des_cbc.h
  51. crypto_des_cbc_unittest.cc
  52. crypto_interface.h
  53. crypto_provider.cc
  54. crypto_provider.h
  55. crypto_provider_unittest.cc
  56. crypto_rot47.cc
  57. crypto_rot47.h
  58. crypto_rot47_unittest.cc
  59. crypto_util_proxy.cc
  60. crypto_util_proxy.h
  61. crypto_util_proxy_unittest.cc
  62. daemon_task.cc
  63. daemon_task.h
  64. daemon_task_unittest.cc
  65. dbus/
  66. dbus_bindings/
  67. dbus_properties_proxy_interface.h
  68. default_profile.cc
  69. default_profile.h
  70. default_profile_unittest.cc
  71. device.cc
  72. device.h
  73. device_claimer.cc
  74. device_claimer.h
  75. device_claimer_unittest.cc
  76. device_info.cc
  77. device_info.h
  78. device_info_unittest.cc
  79. device_stub.h
  80. device_unittest.cc
  81. dhcp/
  82. dhcp_properties.cc
  83. dhcp_properties.h
  84. dhcp_properties_unittest.cc
  85. dns_client.cc
  86. dns_client.h
  87. dns_client_factory.cc
  88. dns_client_factory.h
  89. dns_client_unittest.cc
  90. dns_server_proxy.cc
  91. dns_server_proxy.h
  92. dns_server_proxy_factory.cc
  93. dns_server_proxy_factory.h
  94. dns_server_tester.cc
  95. dns_server_tester.h
  96. dns_server_tester_unittest.cc
  97. doc/
  98. eap_credentials.cc
  99. eap_credentials.h
  100. eap_credentials_unittest.cc
  101. eap_listener.cc
  102. eap_listener.h
  103. eap_listener_unittest.cc
  104. eap_protocol.h
  105. ephemeral_profile.cc
  106. ephemeral_profile.h
  107. error.cc
  108. error.h
  109. error_unittest.cc
  110. ethernet/
  111. event_dispatcher.cc
  112. event_dispatcher.h
  113. external_task.cc
  114. external_task.h
  115. external_task_unittest.cc
  116. fake_store.cc
  117. fake_store.h
  118. file_io.cc
  119. file_io.h
  120. file_reader.cc
  121. file_reader.h
  122. file_reader_unittest.cc
  123. firewall_proxy_interface.h
  124. geolocation_info.cc
  125. geolocation_info.h
  126. hook_table.cc
  127. hook_table.h
  128. hook_table_unittest.cc
  129. http_proxy.cc
  130. http_proxy.h
  131. http_proxy_unittest.cc
  132. http_request.cc
  133. http_request.h
  134. http_request_unittest.cc
  135. http_url.cc
  136. http_url.h
  137. http_url_unittest.cc
  138. icmp.cc
  139. icmp.h
  140. icmp_session.cc
  141. icmp_session.h
  142. icmp_session_factory.cc
  143. icmp_session_factory.h
  144. icmp_session_unittest.cc
  145. icmp_unittest.cc
  146. init/
  147. ip_address_store.cc
  148. ip_address_store.h
  149. ip_address_store_unittest.cc
  150. ipconfig.cc
  151. ipconfig.h
  152. ipconfig_adaptor_stub.cc
  153. ipconfig_adaptor_stub.h
  154. ipconfig_unittest.cc
  155. json_store.cc
  156. json_store.h
  157. json_store_unittest.cc
  158. key_file_store.cc
  159. key_file_store.h
  160. key_file_store_unittest.cc
  161. key_value_store.cc
  162. key_value_store.h
  163. key_value_store_unittest.cc
  164. libshill-client-test.pc.in
  165. libshill-client.pc.in
  166. link_monitor.cc
  167. link_monitor.h
  168. link_monitor_unittest.cc
  169. logging.cc
  170. logging.h
  171. manager.cc
  172. manager.h
  173. manager_unittest.cc
  174. metrics.cc
  175. metrics.h
  176. metrics_unittest.cc
  177. mobile_operator_db/
  178. mock_active_link_monitor.cc
  179. mock_active_link_monitor.h
  180. mock_adaptors.cc
  181. mock_adaptors.h
  182. mock_ares.cc
  183. mock_ares.h
  184. mock_async_connection.cc
  185. mock_async_connection.h
  186. mock_certificate_file.cc
  187. mock_certificate_file.h
  188. mock_connection.cc
  189. mock_connection.h
  190. mock_connection_health_checker.cc
  191. mock_connection_health_checker.h
  192. mock_connection_info_reader.cc
  193. mock_connection_info_reader.h
  194. mock_connectivity_trial.cc
  195. mock_connectivity_trial.h
  196. mock_control.cc
  197. mock_control.h
  198. mock_crypto_util_proxy.cc
  199. mock_crypto_util_proxy.h
  200. mock_dbus_manager.cc
  201. mock_dbus_manager.h
  202. mock_dbus_properties_proxy.cc
  203. mock_dbus_properties_proxy.h
  204. mock_device.cc
  205. mock_device.h
  206. mock_device_claimer.cc
  207. mock_device_claimer.h
  208. mock_device_info.cc
  209. mock_device_info.h
  210. mock_dhcp_properties.cc
  211. mock_dhcp_properties.h
  212. mock_dns_client.cc
  213. mock_dns_client.h
  214. mock_dns_client_factory.cc
  215. mock_dns_client_factory.h
  216. mock_dns_server_proxy.cc
  217. mock_dns_server_proxy.h
  218. mock_dns_server_proxy_factory.cc
  219. mock_dns_server_proxy_factory.h
  220. mock_dns_server_tester.cc
  221. mock_dns_server_tester.h
  222. mock_eap_credentials.cc
  223. mock_eap_credentials.h
  224. mock_eap_listener.cc
  225. mock_eap_listener.h
  226. mock_event_dispatcher.cc
  227. mock_event_dispatcher.h
  228. mock_external_task.cc
  229. mock_external_task.h
  230. mock_file_io.h
  231. mock_firewall_proxy.h
  232. mock_http_request.cc
  233. mock_http_request.h
  234. mock_icmp.cc
  235. mock_icmp.h
  236. mock_icmp_session.cc
  237. mock_icmp_session.h
  238. mock_icmp_session_factory.cc
  239. mock_icmp_session_factory.h
  240. mock_ip_address_store.cc
  241. mock_ip_address_store.h
  242. mock_ipconfig.cc
  243. mock_ipconfig.h
  244. mock_link_monitor.cc
  245. mock_link_monitor.h
  246. mock_log.cc
  247. mock_log.h
  248. mock_log_unittest.cc
  249. mock_manager.cc
  250. mock_manager.h
  251. mock_metrics.cc
  252. mock_metrics.h
  253. mock_passive_link_monitor.cc
  254. mock_passive_link_monitor.h
  255. mock_pending_activation_store.cc
  256. mock_pending_activation_store.h
  257. mock_portal_detector.cc
  258. mock_portal_detector.h
  259. mock_power_manager.cc
  260. mock_power_manager.h
  261. mock_power_manager_proxy.cc
  262. mock_power_manager_proxy.h
  263. mock_ppp_device.cc
  264. mock_ppp_device.h
  265. mock_ppp_device_factory.cc
  266. mock_ppp_device_factory.h
  267. mock_process_manager.cc
  268. mock_process_manager.h
  269. mock_profile.cc
  270. mock_profile.h
  271. mock_property_store.cc
  272. mock_property_store.h
  273. mock_resolver.cc
  274. mock_resolver.h
  275. mock_routing_table.cc
  276. mock_routing_table.h
  277. mock_service.cc
  278. mock_service.h
  279. mock_socket_info_reader.cc
  280. mock_socket_info_reader.h
  281. mock_store.cc
  282. mock_store.h
  283. mock_traffic_monitor.cc
  284. mock_traffic_monitor.h
  285. mock_virtual_device.cc
  286. mock_virtual_device.h
  287. net/
  288. nice_mock_control.cc
  289. nice_mock_control.h
  290. passive_link_monitor.cc
  291. passive_link_monitor.h
  292. passive_link_monitor_unittest.cc
  293. pending_activation_store.cc
  294. pending_activation_store.h
  295. pending_activation_store_unittest.cc
  296. portal_detector.cc
  297. portal_detector.h
  298. portal_detector_unittest.cc
  299. power_manager.cc
  300. power_manager.h
  301. power_manager_proxy_interface.h
  302. power_manager_proxy_stub.cc
  303. power_manager_proxy_stub.h
  304. power_manager_unittest.cc
  305. ppp_daemon.cc
  306. ppp_daemon.h
  307. ppp_daemon_unittest.cc
  308. ppp_device.cc
  309. ppp_device.h
  310. ppp_device_factory.cc
  311. ppp_device_factory.h
  312. ppp_device_unittest.cc
  313. pppoe/
  314. process_manager.cc
  315. process_manager.h
  316. process_manager_unittest.cc
  317. profile.cc
  318. profile.h
  319. profile_adaptor_stub.cc
  320. profile_adaptor_stub.h
  321. profile_unittest.cc
  322. property_accessor.h
  323. property_accessor_unittest.cc
  324. property_iterator.h
  325. property_observer.h
  326. property_observer_interface.h
  327. property_observer_unittest.cc
  328. property_store.cc
  329. property_store.h
  330. property_store_unittest.cc
  331. property_store_unittest.h
  332. protobuf_lite_streams.cc
  333. protobuf_lite_streams.h
  334. provider_db_unittest.bfd
  335. provider_interface.h
  336. refptr_types.h
  337. resolver.cc
  338. resolver.h
  339. resolver_unittest.cc
  340. result_aggregator.cc
  341. result_aggregator.h
  342. result_aggregator_unittest.cc
  343. routing_table.cc
  344. routing_table.h
  345. routing_table_entry.h
  346. routing_table_unittest.cc
  347. rpc_service_watcher_interface.h
  348. rpc_task.cc
  349. rpc_task.h
  350. rpc_task_adaptor_stub.cc
  351. rpc_task_adaptor_stub.h
  352. rpc_task_unittest.cc
  353. scope_logger.cc
  354. scope_logger.h
  355. scope_logger_unittest.cc
  356. scoped_umask.cc
  357. scoped_umask.h
  358. service.cc
  359. service.h
  360. service_property_change_notifier.cc
  361. service_property_change_notifier.h
  362. service_property_change_test.cc
  363. service_property_change_test.h
  364. service_sorter.h
  365. service_under_test.cc
  366. service_under_test.h
  367. service_unittest.cc
  368. setup_wifi/
  369. shill-client.gyp
  370. shill.gyp
  371. shill.gypi
  372. shill.rc
  373. shill_ares.cc
  374. shill_ares.h
  375. shill_config.cc
  376. shill_config.h
  377. shill_daemon.cc
  378. shill_daemon.h
  379. shill_main.cc
  380. shill_test_config.cc
  381. shill_test_config.h
  382. shims/
  383. socket_info.cc
  384. socket_info.h
  385. socket_info_reader.cc
  386. socket_info_reader.h
  387. socket_info_reader_unittest.cc
  388. socket_info_unittest.cc
  389. static_ip_parameters.cc
  390. static_ip_parameters.h
  391. static_ip_parameters_unittest.cc
  392. store_factory.cc
  393. store_factory.h
  394. store_interface.h
  395. stub_storage.h
  396. supplicant/
  397. technology.cc
  398. technology.h
  399. technology_unittest.cc
  400. test-rpc-proxy/
  401. test-scripts/
  402. test_event_dispatcher.h
  403. testing.h
  404. testrunner.cc
  405. tethering.cc
  406. tethering.h
  407. third_party_vpn_adaptor_stub.cc
  408. third_party_vpn_adaptor_stub.h
  409. traffic_monitor.cc
  410. traffic_monitor.h
  411. traffic_monitor_unittest.cc
  412. udev/
  413. upstart/
  414. virtual_device.cc
  415. virtual_device.h
  416. virtual_device_unittest.cc
  417. vpn/
  418. wifi/
  419. wimax/