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 |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 | 92 |
93 *current_operation = strdup(current_op.c_str()); | 93 *current_operation = strdup(current_op.c_str()); |
94 *new_version = strdup(new_version_str.c_str()); | 94 *new_version = strdup(new_version_str.c_str()); |
95 if (!(*current_operation && *new_version)) { | 95 if (!(*current_operation && *new_version)) { |
96 *error = NULL; | 96 *error = NULL; |
97 return FALSE; | 97 return FALSE; |
98 } | 98 } |
99 return TRUE; | 99 return TRUE; |
100 } | 100 } |
101 | 101 |
| 102 gboolean update_engine_service_get_track(UpdateEngineService* self, |
| 103 gchar** track, |
| 104 GError **error) { |
| 105 string track_str = |
| 106 chromeos_update_engine::OmahaRequestDeviceParams::GetDeviceTrack(); |
| 107 *track = strdup(track_str.c_str()); |
| 108 return TRUE; |
| 109 } |
| 110 |
102 gboolean update_engine_service_reboot_if_needed(UpdateEngineService* self, | 111 gboolean update_engine_service_reboot_if_needed(UpdateEngineService* self, |
103 GError **error) { | 112 GError **error) { |
104 if (!self->update_attempter_->RebootIfNeeded()) { | 113 if (!self->update_attempter_->RebootIfNeeded()) { |
105 *error = NULL; | 114 *error = NULL; |
106 return FALSE; | 115 return FALSE; |
107 } | 116 } |
108 return TRUE; | 117 return TRUE; |
109 } | 118 } |
110 | 119 |
111 gboolean update_engine_service_set_track(UpdateEngineService* self, | 120 gboolean update_engine_service_set_track(UpdateEngineService* self, |
(...skipping 20 matching lines...) Expand all Loading... |
132 g_signal_emit(self, | 141 g_signal_emit(self, |
133 status_update_signal, | 142 status_update_signal, |
134 0, | 143 0, |
135 last_checked_time, | 144 last_checked_time, |
136 progress, | 145 progress, |
137 current_operation, | 146 current_operation, |
138 new_version, | 147 new_version, |
139 new_size); | 148 new_size); |
140 return TRUE; | 149 return TRUE; |
141 } | 150 } |
OLD | NEW |