AU: Skip all automatic update checks if OOBE is not complete.
Right before an automatic update check is initiated, check if OOBE is
complete. If it is, go ahead with the check. Otherwise, skip the check
and schedule a new one as if it is the first one.
BUG=5377
TEST=unit tests, gmerged on device and tried with/without .oobe_completed.
Change-Id: I713e156a176b58a4dd04a01bca340b88277b0361
Review URL: http://codereview.chromium.org/3398018
diff --git a/utils.h b/utils.h
index 8b070ed..a46ffef 100644
--- a/utils.h
+++ b/utils.h
@@ -27,6 +27,10 @@
// assumes the build is official.
bool IsOfficialBuild();
+// Returns true if the OOBE process has been completed and EULA accepted, false
+// otherwise.
+bool IsOOBEComplete();
+
// Writes the data passed to path. The file at path will be overwritten if it
// exists. Returns true on success, false otherwise.
bool WriteFile(const char* path, const char* data, int data_len);