AU: pass whether or not we can tolerate a delta to the server

BUG=4848
TEST=attached unittests

Review URL: http://codereview.chromium.org/3017006
diff --git a/omaha_request_params.cc b/omaha_request_params.cc
index 502f7b0..1ab6f2c 100644
--- a/omaha_request_params.cc
+++ b/omaha_request_params.cc
@@ -38,6 +38,14 @@
   app_id = OmahaRequestParams::kAppId;
   app_lang = "en-US";
   app_track = GetLsbValue("CHROMEOS_RELEASE_TRACK", "");
+  struct stat stbuf;
+  
+  // Deltas are only okay if the /.nodelta file does not exist.
+  // If we don't know (i.e. stat() returns some unexpected error),
+  // then err on the side of caution and say deltas are not okay
+  delta_okay = (stat((root_ + "/.nodelta").c_str(), &stbuf) < 0) &&
+               (errno == ENOENT);
+
   update_url = GetLsbValue("CHROMEOS_AUSERVER",
                            OmahaRequestParams::kUpdateUrl);
   return true;