Add a "when" parameter to Chain.capture(). This makes it easy for users to switch capturing on and off based on whether they're in a debug or development mode. R=rnystrom@google.com Review URL: https://codereview.chromium.org//1583483003 .