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

Side by Side Diff: main.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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « dbus_service.cc ('k') | omaha_request_action.cc » ('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 <string> 5 #include <string>
6 #include <tr1/memory> 6 #include <tr1/memory>
7 #include <vector> 7 #include <vector>
8 8
9 #include <gflags/gflags.h> 9 #include <gflags/gflags.h>
10 #include <glib.h> 10 #include <glib.h>
(...skipping 22 matching lines...) Expand all
33 33
34 namespace { 34 namespace {
35 35
36 struct PeriodicallyUpdateArgs { 36 struct PeriodicallyUpdateArgs {
37 UpdateAttempter* update_attempter; 37 UpdateAttempter* update_attempter;
38 gboolean should_repeat; 38 gboolean should_repeat;
39 }; 39 };
40 40
41 gboolean PeriodicallyUpdate(void* arg) { 41 gboolean PeriodicallyUpdate(void* arg) {
42 PeriodicallyUpdateArgs* args = reinterpret_cast<PeriodicallyUpdateArgs*>(arg); 42 PeriodicallyUpdateArgs* args = reinterpret_cast<PeriodicallyUpdateArgs*>(arg);
43 args->update_attempter->Update(); 43 args->update_attempter->Update("", "");
44 return args->should_repeat; 44 return args->should_repeat;
45 } 45 }
46 46
47 void SetupDbusService(UpdateEngineService* service) { 47 void SetupDbusService(UpdateEngineService* service) {
48 DBusGConnection *bus; 48 DBusGConnection *bus;
49 DBusGProxy *proxy; 49 DBusGProxy *proxy;
50 GError *error = NULL; 50 GError *error = NULL;
51 51
52 bus = dbus_g_bus_get(DBUS_BUS_SYSTEM, &error); 52 bus = dbus_g_bus_get(DBUS_BUS_SYSTEM, &error);
53 if (!bus) { 53 if (!bus) {
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 g_main_loop_run(loop); 138 g_main_loop_run(loop);
139 139
140 // Cleanup: 140 // Cleanup:
141 g_main_loop_unref(loop); 141 g_main_loop_unref(loop);
142 update_attempter.set_dbus_service(NULL); 142 update_attempter.set_dbus_service(NULL);
143 g_object_unref(G_OBJECT(service)); 143 g_object_unref(G_OBJECT(service));
144 144
145 LOG(INFO) << "Chrome OS Update Engine terminating"; 145 LOG(INFO) << "Chrome OS Update Engine terminating";
146 return 0; 146 return 0;
147 } 147 }
OLDNEW
« no previous file with comments | « dbus_service.cc ('k') | omaha_request_action.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698