AU: disable GPIOs in production; some structural changes
Since we are not making use of the GPIO funcionality in UE for the
moment, it's been advised that it should be disabled. This CL does just
that, plus a few small changes:
* Adds a "no-op" GPIO implementation, which simply returns a constant
value every time it's being asked whether test-mode was signaled (in
this case, we set it to return false).
* The GPIO handler is embedded in SystemState. This makes sense from
both the conceptual and usability standpoint. The SystemState object
can be parametrized to initialize either a real or a no-op GPIO
handler.
BUG=chromium-os:32263
TEST=passes unit tests; does not engage GPIO protocol on x86-alex
Change-Id: I8121647baa7611041073dcf305beddab57c0e49c
Reviewed-on: https://gerrit.chromium.org/gerrit/40633
Reviewed-by: Jay Srinivasan <jaysri@chromium.org>
Commit-Queue: Gilad Arnold <garnold@chromium.org>
Tested-by: Gilad Arnold <garnold@chromium.org>
diff --git a/update_attempter.h b/update_attempter.h
index df32536..ec0567b 100644
--- a/update_attempter.h
+++ b/update_attempter.h
@@ -18,7 +18,6 @@
#include "update_engine/action_processor.h"
#include "update_engine/chrome_browser_proxy_resolver.h"
#include "update_engine/download_action.h"
-#include "update_engine/gpio_handler.h"
#include "update_engine/omaha_request_params.h"
#include "update_engine/omaha_response_handler_action.h"
#include "update_engine/proxy_resolver.h"
@@ -61,8 +60,7 @@
static const int kMaxDeltaUpdateFailures;
UpdateAttempter(SystemState* system_state,
- DbusGlibInterface* dbus_iface,
- GpioHandler* gpio_handler);
+ DbusGlibInterface* dbus_iface);
virtual ~UpdateAttempter();
// Checks for update and, if a newer version is available, attempts to update
@@ -359,9 +357,6 @@
// A flag indicating whether a test update cycle was already attempted.
bool is_test_update_attempted_;
- // GPIO handler object.
- GpioHandler* gpio_handler_;
-
// The current scatter factor as found in the policy setting.
base::TimeDelta scatter_factor_;