Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1361)

Unified Diff: omaha_request_params.cc

Issue 3017006: AU: pass whether or not we can tolerate a delta to the server (Closed) Base URL: ssh://git@chromiumos-git/update_engine.git
Patch Set: merge master (which has petkov's CL in) Created 10 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « omaha_request_params.h ('k') | omaha_request_params_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: omaha_request_params.cc
diff --git a/omaha_request_params.cc b/omaha_request_params.cc
index 502f7b0602e50c64a7e1ef2667295950c029185d..1ab6f2cb5e2a6d12466fe3c6a86fee5f5e65e0de 100644
--- a/omaha_request_params.cc
+++ b/omaha_request_params.cc
@@ -38,6 +38,14 @@ bool OmahaRequestDeviceParams::Init() {
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;
« no previous file with comments | « omaha_request_params.h ('k') | omaha_request_params_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698