Daniel Erat has posted comments on this change.
Change subject: [login_manager] Make hang-detection flag optionally take an interval
......................................................................
Patch Set 2: (4 inline comments)
....................................................
File liveness_checker_impl.cc
Line 38: kLivenessCheckIntervalSeconds),
i think it'd also be cleaner to get rid of the "negative means use some default" behavior and just make the caller pass in whatever interval they want. (otherwise, you end up with e.g. session_manager_main.cc claiming that the default is 60, when the actual constant lives here -- it'd be easy for the usage message to get out of sync.)
....................................................
File liveness_checker_impl_unittest.cc
Line 108: false, /* Disable aborting */
nit: i think that // is usually used for end-of-line comments; c-style comments are used for e.g.
false /* disable aborting */,
....................................................
File session_manager_main.cc
Line 135: hang_detection_interval = -1;
you're assigning -1 to an unsigned int here
....................................................
File session_manager_service.h
Line 74: uint hang_detection_interval,
document that a negative interval disables hang detection; also make this be an int instead of an unsigned int.
it'd be good to put a "_sec" prefix on the name so that callers aren't left wondering if it's ms, seconds, etc. base::TimeDelta would be best, although that makes it tougher to make this double as a enable/disable setting -- you could use null/0 for that, i suppose.
Gerrit-MessageType: comment
Gerrit-Change-Id: I76e896be631cbbb9012f3f3e2b4eba94f4a20633
Gerrit-PatchSet: 2
Gerrit-Project: chromiumos/platform/login_manager
Gerrit-Branch: master
Gerrit-Owner: Chris Masone <
cma...@chromium.org>