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 <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 Loading... |
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 Loading... |
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 } |
OLD | NEW |