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

Side by Side Diff: update_engine_client.cc

Issue 4103002: AU: Implement switching of tracks through SetTrack. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/update_engine.git
Patch Set: review comments 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 | « omaha_request_params_unittest.cc ('k') | no next file » | 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 <string> 5 #include <string>
6 6
7 #include <gflags/gflags.h> 7 #include <gflags/gflags.h>
8 #include <glib.h> 8 #include <glib.h>
9 9
10 #include "update_engine/marshal.glibmarshal.h" 10 #include "update_engine/marshal.glibmarshal.h"
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 GError* error = NULL; 182 GError* error = NULL;
183 183
184 CHECK(GetProxy(&proxy)); 184 CHECK(GetProxy(&proxy));
185 185
186 gboolean rc = 186 gboolean rc =
187 org_chromium_UpdateEngineInterface_set_track(proxy, 187 org_chromium_UpdateEngineInterface_set_track(proxy,
188 track.c_str(), 188 track.c_str(),
189 &error); 189 &error);
190 CHECK_EQ(rc, true) << "Error setting the track: " 190 CHECK_EQ(rc, true) << "Error setting the track: "
191 << GetGErrorMessage(error); 191 << GetGErrorMessage(error);
192 LOG(INFO) << "TODO: Track permanently set to: " << track; 192 LOG(INFO) << "Track permanently set to: " << track;
193 } 193 }
194 194
195 static gboolean CompleteUpdateSource(gpointer data) { 195 static gboolean CompleteUpdateSource(gpointer data) {
196 string current_op; 196 string current_op;
197 if (!GetStatus(&current_op) || current_op == "UPDATE_STATUS_IDLE") { 197 if (!GetStatus(&current_op) || current_op == "UPDATE_STATUS_IDLE") {
198 LOG(ERROR) << "Update failed."; 198 LOG(ERROR) << "Update failed.";
199 exit(1); 199 exit(1);
200 } 200 }
201 if (current_op == "UPDATE_STATUS_UPDATED_NEED_REBOOT") { 201 if (current_op == "UPDATE_STATUS_UPDATED_NEED_REBOOT") {
202 LOG(INFO) << "Update succeeded -- reboot needed."; 202 LOG(INFO) << "Update succeeded -- reboot needed.";
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 273
274 if (FLAGS_reboot) { 274 if (FLAGS_reboot) {
275 LOG(INFO) << "Requesting a reboot..."; 275 LOG(INFO) << "Requesting a reboot...";
276 CHECK(RebootIfNeeded()); 276 CHECK(RebootIfNeeded());
277 return 0; 277 return 0;
278 } 278 }
279 279
280 LOG(INFO) << "Done."; 280 LOG(INFO) << "Done.";
281 return 0; 281 return 0;
282 } 282 }
OLDNEW
« no previous file with comments | « omaha_request_params_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698