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

Unified Diff: main.cc

Issue 3215006: AU: Implement exponential back off for 500 and 503 HTTP response codes. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/update_engine.git
Patch Set: elaborate on the CHECK Created 10 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « download_action.h ('k') | omaha_request_action.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: main.cc
diff --git a/main.cc b/main.cc
index 64c6aba6db5d949eb176c9def06b1fc6f5348bbe..f027033a52172014d4564a6f3d1a2c9ded9682b1 100644
--- a/main.cc
+++ b/main.cc
@@ -6,20 +6,20 @@
#include <tr1/memory>
#include <vector>
+#include <base/at_exit.h>
+#include <base/command_line.h>
+#include <base/logging.h>
+#include <base/string_util.h>
#include <gflags/gflags.h>
#include <glib.h>
+#include <metrics/metrics_library.h>
-#include "base/at_exit.h"
-#include "base/command_line.h"
-#include "base/logging.h"
-#include "base/string_util.h"
-#include "metrics/metrics_library.h"
#include "update_engine/dbus_constants.h"
#include "update_engine/dbus_service.h"
#include "update_engine/prefs.h"
#include "update_engine/subprocess.h"
#include "update_engine/update_attempter.h"
-#include "update_engine/utils.h"
+#include "update_engine/update_check_scheduler.h"
extern "C" {
#include "update_engine/update_engine.dbusserver.h"
@@ -128,7 +128,9 @@ int main(int argc, char** argv) {
update_attempter.set_dbus_service(service);
chromeos_update_engine::SetupDbusService(service);
- update_attempter.InitiatePeriodicUpdateChecks();
+ // Schedule periodic update checks.
+ chromeos_update_engine::UpdateCheckScheduler scheduler(&update_attempter);
+ scheduler.Run();
// Update boot flags after 45 seconds
g_timeout_add_seconds(45, &chromeos_update_engine::UpdateBootFlags, NULL);
« no previous file with comments | « download_action.h ('k') | omaha_request_action.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698