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

Unified Diff: update_attempter.cc

Issue 3048008: Add support to update_engine_client for -app_version and -omaha_url. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/update_engine.git
Patch Set: Don't use ?: shorthand. 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 | « update_attempter.h ('k') | update_engine.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: update_attempter.cc
diff --git a/update_attempter.cc b/update_attempter.cc
index 5cf32e4f69cf06e18343122c518cbe3f840d9141..014f82274729d874450b3a3366b3e0afd8d9dd2a 100644
--- a/update_attempter.cc
+++ b/update_attempter.cc
@@ -114,7 +114,8 @@ ActionExitCode GetErrorCodeForAction(AbstractAction* action,
return code;
}
-void UpdateAttempter::Update() {
+void UpdateAttempter::Update(const std::string& app_version,
+ const std::string& omaha_url) {
if (status_ == UPDATE_STATUS_UPDATED_NEED_REBOOT) {
LOG(INFO) << "Not updating b/c we already updated and we're waiting for "
<< "reboot";
@@ -124,7 +125,7 @@ void UpdateAttempter::Update() {
// Update in progress. Do nothing
return;
}
- if (!omaha_request_params_.Init()) {
+ if (!omaha_request_params_.Init(app_version, omaha_url)) {
LOG(ERROR) << "Unable to initialize Omaha request device params.";
return;
}
@@ -210,13 +211,14 @@ void UpdateAttempter::Update() {
processor_.StartProcessing();
}
-void UpdateAttempter::CheckForUpdate() {
+void UpdateAttempter::CheckForUpdate(const std::string& app_version,
+ const std::string& omaha_url) {
if (status_ != UPDATE_STATUS_IDLE) {
LOG(INFO) << "Check for update requested, but status is "
<< UpdateStatusToString(status_) << ", so not checking.";
return;
}
- Update();
+ Update(app_version, omaha_url);
}
// Delegate methods:
« no previous file with comments | « update_attempter.h ('k') | update_engine.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698