Index: utils.cc |
diff --git a/utils.cc b/utils.cc |
index 4c5a195cf4982246ce06d1c68f1ced5a12856b5a..d691739bb3100d77cb4da3ad6fe4a78327569f70 100644 |
--- a/utils.cc |
+++ b/utils.cc |
@@ -16,6 +16,7 @@ |
#include <algorithm> |
#include "chromeos/obsolete_logging.h" |
#include "update_engine/file_writer.h" |
+#include "update_engine/omaha_request_params.h" |
#include "update_engine/subprocess.h" |
using std::min; |
@@ -26,6 +27,15 @@ namespace chromeos_update_engine { |
namespace utils { |
+bool IsOfficialBuild() { |
+ OmahaRequestDeviceParams params; |
+ if (!params.Init("", "")) { |
+ return true; |
+ } |
+ return params.app_track != "buildbot-build" && |
+ params.app_track != "developer-build"; |
+} |
+ |
bool WriteFile(const char* path, const char* data, int data_len) { |
DirectFileWriter writer; |
TEST_AND_RETURN_FALSE_ERRNO(0 == writer.Open(path, |