OLD | NEW |
1 // Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium OS Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "update_engine/dbus_service.h" | 5 #include "update_engine/dbus_service.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include <base/logging.h> | 9 #include <base/logging.h> |
10 | 10 |
11 #include "update_engine/marshal.glibmarshal.h" | 11 #include "update_engine/marshal.glibmarshal.h" |
| 12 #include "update_engine/omaha_request_params.h" |
12 #include "update_engine/utils.h" | 13 #include "update_engine/utils.h" |
13 | 14 |
14 using std::string; | 15 using std::string; |
15 | 16 |
16 G_DEFINE_TYPE(UpdateEngineService, update_engine_service, G_TYPE_OBJECT) | 17 G_DEFINE_TYPE(UpdateEngineService, update_engine_service, G_TYPE_OBJECT) |
17 | 18 |
18 static void update_engine_service_finalize(GObject* object) { | 19 static void update_engine_service_finalize(GObject* object) { |
19 G_OBJECT_CLASS(update_engine_service_parent_class)->finalize(object); | 20 G_OBJECT_CLASS(update_engine_service_parent_class)->finalize(object); |
20 } | 21 } |
21 | 22 |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 *error = NULL; | 105 *error = NULL; |
105 return FALSE; | 106 return FALSE; |
106 } | 107 } |
107 return TRUE; | 108 return TRUE; |
108 } | 109 } |
109 | 110 |
110 gboolean update_engine_service_set_track(UpdateEngineService* self, | 111 gboolean update_engine_service_set_track(UpdateEngineService* self, |
111 gchar* track, | 112 gchar* track, |
112 GError **error) { | 113 GError **error) { |
113 if (track) { | 114 if (track) { |
114 LOG(INFO) << "TODO: Setting track to: " << track; | 115 LOG(INFO) << "Setting track to: " << track; |
| 116 if (!chromeos_update_engine::OmahaRequestDeviceParams::SetDeviceTrack( |
| 117 track)) { |
| 118 *error = NULL; |
| 119 return FALSE; |
| 120 } |
115 } | 121 } |
116 return TRUE; | 122 return TRUE; |
117 } | 123 } |
118 | 124 |
119 gboolean update_engine_service_emit_status_update( | 125 gboolean update_engine_service_emit_status_update( |
120 UpdateEngineService* self, | 126 UpdateEngineService* self, |
121 gint64 last_checked_time, | 127 gint64 last_checked_time, |
122 gdouble progress, | 128 gdouble progress, |
123 const gchar* current_operation, | 129 const gchar* current_operation, |
124 const gchar* new_version, | 130 const gchar* new_version, |
125 gint64 new_size) { | 131 gint64 new_size) { |
126 g_signal_emit(self, | 132 g_signal_emit(self, |
127 status_update_signal, | 133 status_update_signal, |
128 0, | 134 0, |
129 last_checked_time, | 135 last_checked_time, |
130 progress, | 136 progress, |
131 current_operation, | 137 current_operation, |
132 new_version, | 138 new_version, |
133 new_size); | 139 new_size); |
134 return TRUE; | 140 return TRUE; |
135 } | 141 } |
OLD | NEW |