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

Side by Side Diff: dbus_service.cc

Issue 4181001: AU: Implement getting of tracks through GetTrack. (Closed) Base URL: http://git.chromium.org/git/update_engine.git
Patch Set: sort by names Created 10 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « dbus_service.h ('k') | omaha_request_params.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « dbus_service.h ('k') | omaha_request_params.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698