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

Unified Diff: omaha_request_prep_action.cc

Issue 2981007: Rename UpdateCheckAction|Params to OmahaRequestAction|Params. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/update_engine.git
Patch Set: fix the comment 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_prep_action.h ('k') | omaha_request_prep_action_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: omaha_request_prep_action.cc
diff --git a/omaha_request_prep_action.cc b/omaha_request_prep_action.cc
index 7163119cb57634ef862f48051c66fe69542ad220..365c46302d17686c329d6ad88d8e631df5cfc16a 100644
--- a/omaha_request_prep_action.cc
+++ b/omaha_request_prep_action.cc
@@ -35,16 +35,16 @@ void OmahaRequestPrepAction::PerformAction() {
const string sp(version + "_" + GetMachineType());
const string track(GetLsbValue("CHROMEOS_RELEASE_TRACK", ""));
const string update_url(GetLsbValue("CHROMEOS_AUSERVER",
- UpdateCheckParams::kUpdateUrl));
+ OmahaRequestParams::kUpdateUrl));
const string board(GetLsbValue("CHROMEOS_RELEASE_BOARD", ""));
- UpdateCheckParams out(machine_id, // machine_id
+ OmahaRequestParams out(machine_id, // machine_id
machine_id, // user_id (use machine_id)
- UpdateCheckParams::kOsPlatform,
- UpdateCheckParams::kOsVersion,
+ OmahaRequestParams::kOsPlatform,
+ OmahaRequestParams::kOsVersion,
sp, // e.g. 0.2.3.3_i686
board, // e.g. x86-generic
- UpdateCheckParams::kAppId,
+ OmahaRequestParams::kAppId,
version, // app version (from lsb-release)
"en-US", // lang
track, // track
@@ -73,12 +73,12 @@ string GuidFromData(const unsigned char data[kGuidDataByteLength]) {
bool OmahaRequestPrepAction::GetMachineId(std::string* out_id) const {
// See if we have an existing Machine ID
const string omaha_id_path = root_ + OmahaIdPath();
-
+
if (utils::ReadFileToString(omaha_id_path, out_id) &&
out_id->size() == kGuidStringLength) {
return true;
}
-
+
// Create a new ID
int rand_fd = open("/dev/urandom", O_RDONLY, 0);
TEST_AND_RETURN_FALSE_ERRNO(rand_fd >= 0);
@@ -107,7 +107,7 @@ string OmahaRequestPrepAction::GetLsbValue(
string file_data;
if (!utils::ReadFileToString(root_ + files[i], &file_data))
continue;
-
+
map<string, string> data = simple_key_value_store::ParseString(file_data);
if (utils::MapContainsKey(data, key))
return data[key];
« no previous file with comments | « omaha_request_prep_action.h ('k') | omaha_request_prep_action_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698