Revert CCT header customization when dynamic module fails to load.

For the benefit of a consistent UI, CCT header customization is
immediately allowed when module loading is started. When module loading
fails, we should revert any customization incurred during module
loading. However, this is not happening prior to this CL because
maybeCustomizeCctHeader() becomes no-op when module fails to load.

We are also using the same criteria as used by CloseButtonNavigator to
determine when to customize the header.

Bug: 882404
Change-Id: Id58d80abf7cea8ecea0fccdf7f85ebe28970ec6d
Reviewed-on: https://chromium-review.googlesource.com/c/1437086
Commit-Queue: John Lin <chuanl@google.com>
Reviewed-by: Michael van Ouwerkerk <mvanouwerkerk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#633949}
3 files changed