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

Unified Diff: dbus_service.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 | « dbus_service.h ('k') | main.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dbus_service.cc
diff --git a/dbus_service.cc b/dbus_service.cc
index 12398cd621eb293f04494e35c542849585bff2d0..54dde41e0de827c8a5cc29ccb21e43573cdef615 100644
--- a/dbus_service.cc
+++ b/dbus_service.cc
@@ -21,7 +21,7 @@ static void update_engine_service_class_init(UpdateEngineServiceClass* klass) {
GObjectClass *object_class;
object_class = G_OBJECT_CLASS(klass);
object_class->finalize = update_engine_service_finalize;
-
+
status_update_signal = g_signal_new(
"status_update",
G_OBJECT_CLASS_TYPE(klass),
@@ -56,21 +56,33 @@ gboolean update_engine_service_get_status(UpdateEngineService* self,
GError **error) {
string current_op;
string new_version_str;
-
+
CHECK(self->update_attempter_->GetStatus(last_checked_time,
progress,
&current_op,
&new_version_str,
new_size));
-
+
*current_operation = strdup(current_op.c_str());
*new_version = strdup(new_version_str.c_str());
return TRUE;
}
+gboolean update_engine_service_attempt_update(UpdateEngineService* self,
+ gchar* app_version,
+ gchar* omaha_url,
+ GError **error) {
+ const string update_app_version = app_version ? app_version : "";
+ const string update_omaha_url = omaha_url ? omaha_url : "";
+ LOG(INFO) << "Attempt update: app_version=\"" << update_app_version << "\" "
+ << "omaha_url=\"" << update_omaha_url << "\"";
+ self->update_attempter_->CheckForUpdate(app_version, omaha_url);
+ return TRUE;
+}
+
gboolean update_engine_service_check_for_update(UpdateEngineService* self,
GError **error) {
- self->update_attempter_->CheckForUpdate();
+ self->update_attempter_->CheckForUpdate("", "");
return TRUE;
}
« no previous file with comments | « dbus_service.h ('k') | main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698