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

Unified Diff: update_attempter.h

Issue 3187012: AU: Throttle notifications based on progress; still notify if slow progress. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/update_engine.git
Patch Set: Don't speed up updates if over total size. 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 | « no previous file | update_attempter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: update_attempter.h
diff --git a/update_attempter.h b/update_attempter.h
index 0f5d605a5c56c14c9c37ce6e7baaa5e37b73fb4f..b2ef3719fa37cf7de85bdb3399153aff60d38d13 100644
--- a/update_attempter.h
+++ b/update_attempter.h
@@ -13,6 +13,7 @@
#include <glib.h>
+#include "base/time.h"
#include "update_engine/action_processor.h"
#include "update_engine/download_action.h"
#include "update_engine/omaha_request_params.h"
@@ -126,7 +127,10 @@ class UpdateAttempter : public ActionProcessorDelegate,
static gboolean StaticManagePriorityCallback(gpointer data);
bool ManagePriorityCallback();
- struct timespec last_notify_time_;
+ // Last status notification timestamp used for throttling. Use
+ // monotonic TimeTicks to ensure that notifications are sent even if
+ // the system clock is set back in the middle of an update.
+ base::TimeTicks last_notify_time_;
std::vector<std::tr1::shared_ptr<AbstractAction> > actions_;
ActionProcessor processor_;
« no previous file with comments | « no previous file | update_attempter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698